Group words by their sorted letters to detect anagrams.
Constraints
Example
>>> group_anagrams(["eat", "tea", "tan", "ate", "nat", "bat"]) [["eat", "tea", "ate"], ["tan", "nat"], ["bat"]] >>> group_anagrams(["listen", "silent", "enlist", "hello"]) [["listen", "silent", "enlist"], ["hello"]] >>> group_anagrams([]) []
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints