Problem
Two strings are anagrams when one is a rearrangement of the other: same letters, same counts, any order. Given strings s and t, return true if t is an anagram of s.
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
- Why
- counts differ
Constraints
0 <= s.length, t.length <= 5 * 10^4s and t contain only lowercase English letters.