Two words are anagrams when one can be made from the other by changing the order of its letters, using every letter exactly once.
You get two strings, s and t. Say true when t can be made by rearranging the letters of s. Say false when it cannot.
Examples
Example 1:
Input: s = "listen", t = "silent"
Output: true
Explanation: Both words use the letters e, i, l, n, s and t once.
Example 2:
Input: s = "aabb", t = "abbb"
Output: false
Explanation: The second word has three b and only one a.
Example 3:
Input: s = "stressed", t = "desserts"
Output: true
Explanation: The letters of "stressed" can be rearranged into "desserts".