Python(beats 99.29%)


  • 0
    A

    '''
    class Solution(object):
    def isAnagram(self, s, t):
    ref = list(set(s)) if len(s) >= len(t) else list(set(t))
    for i in ref:
    if s.count(i) != t.count(i):
    return False
    return True
    '''


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.