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 4e46337 commit b9feddaCopy full SHA for b9fedda
1 file changed
valid-anagram/njngwn.py
@@ -0,0 +1,7 @@
1
+from collections import Counter
2
+
3
+class Solution:
4
+ # Time Complexity: O(n), n: max(len(s), len(t))
5
+ # Space Complexity: O(k), k: number of letters
6
+ def isAnagram(self, s: str, t: str) -> bool:
7
+ return Counter(s) == Counter(t)
0 commit comments