242. Valid Anagram
Intuition
Two strings are anagrams if they contain the same characters with the exact same frequency, just possibly in a different order.
So, we don’t care where characters are — just how many times each character appears in both strings.
Complexity
Space Complexity
Time Complexity
Code
Last updated