One line python solution


  • 0
    L

    from collections import Counter
    class Solution(object):
    def isAnagram(self, s, t):
    """
    :type s: str
    :type t: str
    :rtype: bool
    """
    return Counter(s)==Counter(t)


Log in to reply
 

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