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.
Input: s = "anagram", t = "nagaram"
Output: true
Topics: arrays, hash-map
Asked by: Amazon, Bloomberg, Microsoft, Google
Time complexity: O(n). Space complexity: O(1).