9 lines
166 B
Python
9 lines
166 B
Python
|
# Time: O(N)
|
||
|
# Space: O(N)
|
||
|
|
||
|
from collections import Counter
|
||
|
|
||
|
class Solution:
|
||
|
def isAnagram(self, s: str, t: str) -> bool:
|
||
|
return Counter(s) == Counter(t)
|