Skip to content

Commit 66b7053

Browse files
committed
Runtime: 236 ms (Top 95.16%) | Memory: 16 MB (Top 85.69%)
1 parent 9a7005e commit 66b7053

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
# Runtime: 236 ms (Top 95.16%) | Memory: 16 MB (Top 85.69%)
12
class Solution:
23
def countConsistentStrings(self, allowed: str, words: List[str]) -> int:
34
allowed = set(allowed)
45
count = 0
5-
6+
67
for word in words:
78
for letter in word:
89
if letter not in allowed:
910
count += 1
1011
break
11-
12-
return len(words) - count
12+
13+
return len(words) - count

0 commit comments

Comments
 (0)