def isAnagram(self, s, t):
return sorted(s) == sorted(t)
it's not a good solution in terms of complexity.
true. Its complexity is indeed n log(n). This can be solved in n. But this solution is very simple and fast enough for the problem to pass.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.