Playrix Interview Question

Anagram problem(don't using sort function)