#N1935. Maximum Number of Words You Can Type problem link #solution class Solution { public int canBeTypedWords(String text, String brokenLetters) { int broken[] = new int[26], count = 0;; for(char ch: brokenLetters.toCharArray()) broken[ch-a]++; for(String word: text.split(" ")){ int countLength=0; for(char ch: word.toCharArray()) if(broken[ch-a] == 0) countLength++; if(countLength == word.length()) count++; } return count; } } 14 views𝐉𝐚𝐤𝐡𝐨𝐧𝐠𝐢𝐫, 19:47