Group Anagrams
Given an array of strings, group anagrams together.
Example:
Note:
All inputs will be in lowercase.
The order of your output does not matter.
分析
用dict[sorted(w)] =list of anagrams
注意sorted(w)是list,要tuple才能做key
Last updated
Given an array of strings, group anagrams together.
Example:
Note:
All inputs will be in lowercase.
The order of your output does not matter.
分析
用dict[sorted(w)] =list of anagrams
注意sorted(w)是list,要tuple才能做key
Last updated