Given two strings s and t, return true if and only if t is an anagram of s, meaning both strings contain exactly the same characters with the same frequencies.
1 ≤ s.length, t.length ≤ 5 * 10⁴s and t consist of lowercase English letters.Different lengths → not an anagram. Bail out early.
Two strings are anagrams when they're made of the same letters the same number of times. The order is the only thing allowed to differ. So the job is to compare the two strings while ignoring order.
Time O(n)Space O(1)
The full walkthrough and code are part of Premium
true