sorted() is of O(n*logn)
I don't understand why it runs so fast.
Faster than my O(n) solution.

class Solution(object):
def isAnagram(self, s, t):
maps = {}
mapt = {}
for c in s:
maps[c] = maps.get(c,0)+1
for c in t:
mapt[c] = mapt.get(c,0)+1
return maps == mapt