無聊刷LeetCode 系列49. Group Anagrams

Given an array of strings, group anagrams together.

For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"],
Return:

[
  ["ate", "eat","tea"],
  ["nat","tan"],
  ["bat"]
]

利用Dictionay來記錄排序後所得到的Key值,來完成這個結果

可得到結果如下圖

result