Log in
← All problems

Group anagrams

hardDictionaries40 XP

Group the words that are anagrams of each other (same letters, any order). Sort the words inside each group alphabetically, then sort the groups by their first word.

Examples

Examples use JSON: true/false/null are True/False/None in Python.

Run examples checks the examples above. Submit also runs 3 hidden tests.