Given two strings
tis an anagram of
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
Input: s = "anagram", t = "nagaram" Output: true
Input: s = "rat", t = "car" Output: false
from collections import Counter class Solution: def isAnagram(self, s: str, t: str) -> bool: """ T: O(N) = max(S + T) S: O(N) """ s_mp = Counter(s) t_mp = Counter(t) return s_mp == t_mp