Group strings by anagram identity and return groups sorted by size then lexicographically.
Constraints
Example
>>> anagram_groups_by_size(["eat", "tea", "tan", "ate", "nat", "bat"]) [["bat"], ["nat", "tan"], ["ate", "eat", "tea"]] >>> anagram_groups_by_size(["hello", "world"]) [["hello"], ["world"]] >>> anagram_groups_by_size(["a", "b", "a"]) [["b"], ["a", "a"]]
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints