8000 * Done with "1935. Maximum Number of Words You Can Type". · garciparedes/leetcode@39e28e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 39e28e9

Browse files
committed
* Done with "1935. Maximum Number of Words You Can Type".
1 parent be53356 commit 39e28e9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution:
2+
def canBeTypedWords(self, text: str, brokenLetters: str) -> int:
3+
broken = set(brokenLetters)
4+
5+
ans = 0
6+
for word in text.split():
7+
if set(word) & broken:
8+
continue
9+
ans += 1
10+
11+
return ans

0 commit comments

Comments
 (0)
0