Example 1
- Input
- strs = ["eat", "tea", "tan", "ate", "nat", "bat"]
- Output
- [["bat"], ["nat", "tan"], ["ate", "eat", "tea"]]
ate, eat, and tea share one a, one e, and one t, so they land in the same group. tan and nat share a, n, t; bat has no partner. Group order and word order within a group do not affect correctness.