242. Valid Anagram
Practice Valid Anagram for free on NudgeCode: Easy, Array & Hash Table pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
Return true if t uses exactly the same letters as s, each the same number of times (just rearranged), and false otherwise.
Example
s = "anagram", t = "nagaram" -> true
s = "rat", t = "car" -> false
Constraints
- 1 <= s.length, t.length <= 5 * 10^4
sandtcontain only lowercase English letters