3.Valid Anagram
An Anagram is a word or phrase that's formed by rearranging the letters of another word or phrase.
All Anagrams are same when they are sorted.
Solution:-
Time Complexity:- O(n+m) [
n is the length of 1st string] and [m is the length of 2nd string.]
Space Complexity:- O(1)
Can be considered as constant as the size of the array is 26.
Last updated