Problem
Group together strings that are anagrams of one another.
Example 1
Input: strs = ["eat","tea","tan","ate","nat","bat"]
Output: [["bat"],["nat","tan"],["ate","eat","tea"]]
Constraints
- 1 <= strs.length <= 10^4
Notes
- Focus on the underlying string pattern.
- Write the cleanest correct solution before optimizing further.
- Hidden tests cover larger edge cases than the visible examples.