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 cbe39c8 commit e121646Copy full SHA for e121646
valid-anagram/ayleeee.py
@@ -0,0 +1,8 @@
1
+def is_anagram(s: str, t: str) -> bool:
2
+ # return sorted(s) == sorted(t)
3
+ '''
4
+ Counter : 원소의 빈도수를 세는 자료구조, 한 번씩만 세면 됨
5
+ = O(n)
6
+ Sorted : O(nlogn)
7
8
+ return Counter(s) == Counter(t)
0 commit comments