2 Python Solutions (Both One Liners)
Method 1: Using collections.Counter()\n\nclass Solution:\n    def isAnagram(self, s: str, t: str) -> bool:\n        return(collections.Counter(s) == collections
Method 1: Using ```collections.Counter()```\n```\nclass Solution:\n    def isAnagram(self, s: str, t: str) -> bool:\n        return(collections.Counter(s) == collections.Counter(t))\n```\n\nMethod 2: Using ```sort()```\n```\nclass Solution:\n    def isAnagram(self, s: str, t: str) -> bool:\n\t\treturn(sorted(s) == sorted(t))\n```\nMethod 1 has a better runtime than Method 2.\n```\nMethod 1:\n#Runtime: 48ms\n#Memory Usage: 14.1MB\n\nMethod 2:\n#Runtime: 64ms\n#Memory Usage: 14.8MB\n```\n
['Python3']