We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b80d6e commit 45a0472Copy full SHA for 45a0472
maximum_product_of_word_lengths/src/lib.rs
@@ -1,7 +1,7 @@
1
pub struct Solution {}
2
3
impl Solution {
4
- fn cal_mask(word: &String) -> i32 {
+ fn cal_mask(word: &str) -> i32 {
5
word.chars()
6
.fold(0, |acc, x| acc | 1 << (x as u8 - 'a' as u8))
7
}
0 commit comments