Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

class Solution(object): 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.