One line python solution, beats 98%


  • 0
    P
    def isAnagram(self, s, t):
            return (map(s.count, sorted(set(s))) == map(t.count, sorted(set(t)))) and set(s) == set(t)
    

Log in to reply
 

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