J.P. Morgan Interview Question

The question was group anagrams