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