Group anagrams

A code exercise of about 15 minutes: read the statement, solve «Group anagrams» in the browser and get a review like in a real interview.

Code · 15 min
Loading…

Statement

Write groupAnagrams(words): group the words that are anagrams of each other (same letters, same counts). Return a list of groups: the groups in the order their first word appears and, inside each group, the words in input order. Words only have lowercase letters.