Skip to content

Commit 367b2c4

Browse files
authored
Update Solution.py
1 parent 6b9d989 commit 367b2c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Algorithms/Easy/242_ValidAnagram/Solution.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ def isAnagram(self, s: str, t: str) -> bool:
66
count_t = {}
77
count_s = {}
88
for i in range(len(t)):
9-
count_t[t[i]] = count_t.get(t[i], 0) + 1
10-
count_s[s[i]] = count_s.get(s[i], 0) + 1
9+
count_t[t[i]] = count_t.get(t[i], 0) + 1
10+
count_s[s[i]] = count_s.get(s[i], 0) + 1
1111

1212
for key in count_s.keys():
1313
if count_t.get(key) == None or count_t[key] != count_s[key]:
1414
return False
1515

16-
return True
16+
return True

0 commit comments

Comments
 (0)