Problem statement

https://binarysearch.com/problems/Anagram-Checks/

Solution

Just check if counters are equal.

Complexity

It is O(n + m) for time and O(26) for space.

Code

class Solution:
    def solve(self, s0, s1):
        return Counter(s0) == Counter(s1)