JAVA || Easy Solution || HashMap || ArrayList
\tPLEASE UPVOTE IF YOU LIKE.\n\nclass Solution {\n    public List<List<String>> groupAnagrams(String[] strs) {\n        List<List<String>> result = new ArrayLis
\tPLEASE UPVOTE IF YOU LIKE.\n```\nclass Solution {\n    public List<List<String>> groupAnagrams(String[] strs) {\n        List<List<String>> result = new ArrayList<>();\n        if (strs == null || strs.length == 0) {\n            return result;\n        }\n        if (strs.length == 1) {\n            result.add(Arrays.asList(strs));\n            return result;\n        }\n\n        HashMap<String, List<String>> groups = new HashMap<>();\n        for (String s : strs) {\n            String signature = getSignature(s);\n            groups.putIfAbsent(signature, new ArrayList<>());\n        groups.get(signature).add(s);\n        }\n\n        return new ArrayList<>(groups.values());\n    }\n\n    private String getSignature(String s) {\n        int[] count = new int[26];\n        for (int i = 0; i < s.length(); i++) {\n            count[s.charAt(i) - \'a\']++;\n        }\n\n        StringBuilder sb = new StringBuilder();\n        for (int i = 0; i < 26; i++) {\n            if (count[i] != 0) {\n                sb.append((char) (\'a\' + i)).append(count[i]);\n            }\n        }\n        return sb.toString();\n    }\n}\n```
['Java']