Skip to content

Commit 1ab2ab9

Browse files
author
김가은
committed
solve: valid anagram
1 parent 97b92bf commit 1ab2ab9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

valid-anagram/paran22.py

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

0 commit comments

Comments
 (0)