Valid Anagram
Easy
LC #242
hash mapcountingstringNot attempted yet
Given two strings s and t, return True if t is
an anagram of s: it uses exactly the same letters,
each the same number of times, in any order.
Example 1
Input: s = "listen", t = "silent"
Output: True
Example 2
Input: s = "rat", t = "car"
Output: False
Example 3
Input: s = "aab", t = "abb"
Output: False
Same letters, different counts.
Constraints
- 1 ≤ len(s), len(t) ≤ 10^5
- s and t contain lowercase English letters