Given an array of strings, group anagrams together.
Example:
Input: ["eat", "tea", "tan", "ate", "nat", "bat"], Output: [ ["ate","eat","tea"], ["nat","tan"], ["bat"] ] Note:
All inputs will be in lowercase. The order of your output does not matter.
https://leetcode-cn.com/problems/group-anagrams/solution/
方法
- 建立一个排序之后的string为key的map