@@ -0,0 +1,1231 @@
+/***%0A * Given an array of strings, return all groups of strings that are anagrams.%0A *%0A * Note: All inputs will be in lower-case.%0A */%0Aimport java.util.ArrayList;%0Apublic class Solution %7B%0A    public List%3CString%3E anagrams(String%5B%5D strs) %7B%0A        List%3CString%3E ret = new ArrayList%3CString%3E();%0A        if (strs.length == 1) return ret;%0A        ArrayList%3CString%3E alst = new ArrayList%3CString%3E();%0A        for (String s: strs) %7B%0A            char %5B%5D car = s.toCharArray();%0A            Arrays.sort(car);%0A            alst.add(new String(car));%0A        %7D%0A%0A        int%5B%5D list = new int%5Bstrs.length%5D; // records whether this is an anagrams.%0A        int tmp = 0;%0A        for (int i = 0; i %3C alst.size(); i++) %7B%0A            if (list%5Bi%5D != 0)%0A                continue;%0A            list%5Bi%5D = 1;%0A            tmp = 1;%0A            for (int j = i + 1; j %3C alst.size(); j++) %7B%0A                if (list%5Bj%5D == 0 && alst.get(i).equals(alst.get(j))) %7B%0A                    list%5Bj%5D = 1;%0A                    tmp++;%0A                %7D%0A            %7D%0A            if (tmp == 1)%0A                list%5Bi%5D = 0;%0A        %7D%0A%0A        for (int i = 0; i %3C list.length; i++) %7B%0A            if (list%5Bi%5D == 1)%0A                ret.add(strs%5Bi%5D);%0A        %7D%0A%0A        return ret;%0A    %7D%0A%7D%0A

add Anagrams.java