Skip to content

Commit 727b537

Browse files
committed
feat: add valid anagram solution
1 parent c9df583 commit 727b537

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

valid-anagram/mangodm-web.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from collections import Counter
2+
3+
4+
class Solution:
5+
def isAnagram(self, s: str, t: str) -> bool:
6+
if len(s) != len(t):
7+
return False
8+
9+
return Counter(s) == Counter(t)

0 commit comments

Comments
 (0)