Maximum Number of Words You Can Type LeetCode solution in Rust
1impl Solution {2pub fn can_be_typed_words(text: String, broken_letters: String) -> i32 {3let broken_hash = broken_letters4.into_bytes()5.iter()6.fold([false; 26], |mut acc, &b| {7acc[(b - b'a') as usize] = true;8acc9});1011text12.split_ascii_whitespace()13.filter(|&s| {14s.as_bytes()15.iter()16.all(|&b| !broken_hash[(b - b'a') as usize])17})18.count() as _19}20}