Pyhton solution with O(n) time and efficent memory usage
'''\n\n    def isAnagram(self, s, t):\n        a = len(s)\n        if a != len(t):\n            return False\n\n        chars = [0] * 26\n\n        for i in ran
'''\n\n    def isAnagram(self, s, t):\n        a = len(s)\n        if a != len(t):\n            return False\n\n        chars = [0] * 26\n\n        for i in range(a):\n            chars[ord(s[i]) - ord('a')] += 1\n            chars[ord(t[i]) - ord('a')] -= 1\n\n        for i in range(26):\n            if chars[i]!=0:\n                return False\n\n        return True\n'''
[]