Loading...
Given an array of strings, group the anagrams together.
Output groups one per line, words space-separated and sorted, groups sorted by first word.
eat,tea,tan,ate,nat,bat
ate eat tea bat nat tan
ate eat tea, bat, and nat tan becomes bat and nat tan is sorted to nat tan.