anagram - group with frequency google interview