We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e77153 commit 8ecb50dCopy full SHA for 8ecb50d
python/242-Valid-Anagrams.py
@@ -8,7 +8,4 @@ def isAnagram(self, s: str, t: str) -> bool:
8
for i in range(len(s)):
9
countS[s[i]] = 1 + countS.get(s[i], 0)
10
countT[t[i]] = 1 + countT.get(t[i], 0)
11
- for c in countS:
12
- if countS[c] != countT.get(c, 0):
13
- return False
14
- return True
+ return countS == countT
0 commit comments