LeetCode: Valid Anagram
Problem:
https://leetcode.com/problems/valid-anagram/description/
Code:
class Solution:
def isAnagram(self, s: str, t: str) -> bool:
return Counter(s) == Counter(t)
# class Solution:
# def isAnagram(self, s: str, t: str) -> bool:
# ...
is-power-of-two.hashnode.dev2 min read