Valid Anagram

L3 Easy Arrays & Hashing
Concept
An anagram check is really a letter-frequency comparison: two words match only when every letter count matches.
Two strings are anagrams when one is just the other with its letters rearranged. Given s and t, return true if t is an anagram of s, and false otherwise.
Examples
▸ s = "care", t = "race"
→ true
▸ s = "stressed", t = "desserts"
→ true
▸ s = "hello", t = "world"
→ false
Progressive Hints
Hint 1 · Nudge
Anagrams are two bags of letters that weigh the same.
Hint 2 · Plan
Tally the characters of s into a frequency map. Then walk t, subtracting each character from the tally. If any character is missing or goes negative, they aren't anagrams. Compare lengths first: different lengths can't be anagrams.
Hint 3 · Approach
If the lengths differ, return false. counts = tally of s's characters. For each c in t: counts[c] = counts[c] - 1, and if it goes below 0 return false. Return true.
Output
// Run your code to see the output here.