leetcode
Java
hashmap
Given an array of strings strs, group the anagrams together. You can return the answer in any order.
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
給一字符串數組, 將錯位詞(指相同字符不同排列的字符串) 分組
map
map
裡的value
轉換成ArrayList才可回傳Runtime: 6 ms, faster than 80.28% of Java online submissions for Group Anagrams.
Memory Usage: 42 MB, less than 81.58% of Java online submissions for Group Anagrams.