Gaviti interview question

Basic anagram question with strings.