@@ -0,0 +1,640 @@
+import java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Apublic class _0049GroupAnagrams %7B%0A  public List%3CList%3CString%3E%3E groupAnagrams(String%5B%5D strs) %7B%0A    Map%3CString, List%3CString%3E%3E map = new HashMap%3C%3E();%0A    for (String str : strs) %7B%0A      int%5B%5D chars = new int%5B26%5D;%0A      for (int i = 0; i %3C str.length(); i++) %7B%0A        chars%5Bstr.charAt(i) - 97%5D++;%0A      %7D%0A      String hash = Arrays.toString(chars);%0A      if (!map.containsKey(hash)) %7B%0A        map.put(hash, new ArrayList%3C%3E());%0A      %7D%0A      map.get(hash).add(str);%0A    %7D%0A    return new ArrayList%3C%3E(map.values());%0A  %7D%0A%7D%0A

Add _0049GroupAnagrams