Skip to content

Commit b5058dd

Browse files
committed
Time: 34 ms (99.97%), Space: 16.7 MB (91.09%) - LeetHub
1 parent 727acfe commit b5058dd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution(object):
2+
def isAnagram(self, s, t):
3+
if len(s) != len(t):
4+
return False
5+
for idx in set(s):
6+
if s.count(idx) != t.count(idx):
7+
return False
8+
return True

0 commit comments

Comments
 (0)