Given two strings s and t, return true if t is an anagram of s — that is, t uses exactly the same letters as s, the same number of times, in any order.
Example 1
Input: s = "anagram", t = "nagaram"
Output: true
Example 2
Input: s = "rat", t = "car"
Output: false
Constraints
1 <= s.length, t.length <= 50000s and t consist of lowercase English letters only.Input
s = "anagram", t = "nagaram"
Expected
true
5 hidden tests run on submit