20241024 finished.

This commit is contained in:
2024-10-24 09:08:13 +08:00
parent 3102da99a8
commit bce8de1c85
266 changed files with 2321 additions and 2014 deletions

View File

@@ -3,7 +3,6 @@
*/
pub struct Solution {}
// submission codes start here
use std::collections::HashMap;
@@ -25,7 +24,7 @@ impl Solution {
if *value == 0 {
map.remove(&c);
}
},
}
None => {
return false;
}
@@ -44,6 +43,9 @@ mod tests {
#[test]
fn test_242() {
assert!(Solution::is_anagram("anagram".to_owned(), "nagaram".to_owned()));
assert!(Solution::is_anagram(
"anagram".to_owned(),
"nagaram".to_owned()
));
}
}