Playrix interview question

Anagram problem(don't using sort function)