Valid Anagram

反正就是统计然后比对就行了

class Solution(object):
    def isAnagram(self, s, t):
        return collections.Counter(s) == collections.Counter(t)
class Solution(object):
    def isAnagram(self, s, t):
        return sorted(s) == sorted(t)

results matching ""

    No results matching ""