public List<String> anagrams(String[] strs) {
        List<String> result = new ArrayList<String>();
        Map<String,List<String>> map = new HashMap<String,List<String>>();
        for (int i = 0; i < strs.length ;i++ ) {
            char[] c = strs[i].toCharArray();
            Arrays.sort(c);
            List<String> list  = map.get(new String(c));

            if(list == null){
                list = new ArrayList<String>();
                list.add(strs[i]);
                map.put(new String(c),list);
                // System.out.println(new String(c)+"  100");
            }
            else
                list.add(strs[i]);
        }

        for( String s : map.keySet()){
            List<String> list = map.get(s);
            // System.out.println(list.size());
            if(list.size() > 1){

                result.addAll(list);
            }
        }
        // System.out.println(map.size());

        return result;
    }