Pregunta de entrevista de Samsung Electronics

One coding ques, To group words with the same anagrams.