@@ -0,0 +1,1002 @@
+public class Solution %7B%0A    /**%0A     * @param strs: the given array of strings%0A     * @return: The anagrams which have been divided into groups%0A     */%0A    public List%3CList%3CString%3E%3E groupAnagrams(String%5B%5D strs) %7B%0A        // write your code here%0A        %0A        Map%3CString, List%3CString%3E%3E map = new HashMap%3C%3E();%0A        List%3CList%3CString%3E%3E res = new ArrayList%3CList%3CString%3E%3E();%0A        %0A        for (String str: strs) %7B%0A            char%5B%5D c = str.toCharArray();%0A            Arrays.sort(c);%0A            String key = String.valueOf(c);%0A            %0A            if (! map.containsKey(key)) %7B%0A                List%3CString%3E list = new ArrayList%3C%3E();%0A                list.add(str);%0A                map.put(key, list);%0A            %7D else %7B%0A                List%3CString%3E list = map.get(key);%0A                list.add(str);%0A                map.put(key, list);%0A            %7D%0A        %7D%0A        %0A        for (List%3CString%3E value: map.values()) %7B%0A            res.add(value);%0A        %7D%0A        %0A        return res;%0A    %7D%0A%7D

add 772