- Given two strings s and t, return True if t is an anagram of s, and False otherwise.
- An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
- This challenge corresponds to LeetCode #242.
1 <= len(s), len(t) <= 5 * 104
- s and t consist of lowercase English letters.
s = "anagram", t = "nagaram"
s = "rat", t = "car"
Below is my solution and some test cases. This solution has a linear time complexity O(n+n) and a linear space complexity O(n+n), where n is the length of the input string s.