Java || Easy || HashMap
Please Upvote if you understood this (\uFF5E\uFFE3\u25BD\uFFE3)\uFF5E\n\nclass Solution {\n    public List<List<String>> groupAnagrams(String[] strs) {\n       
## **Please Upvote if you understood this** (\uFF5E\uFFE3\u25BD\uFFE3)\uFF5E\n```\nclass Solution {\n    public List<List<String>> groupAnagrams(String[] strs) {\n        Map<String,ArrayList<String>> mpp = new HashMap<String,ArrayList<String>>();\n\n        for(String st:strs){\n            char[] ch = st.toCharArray();\n            Arrays.sort(ch);\n            String ss = String.valueOf(ch);\n            if(!mpp.containsKey(ss)) mpp.put(ss,new ArrayList<String>());\n            mpp.get(ss).add(st);\n        }\n        return new ArrayList<>(mpp.values());\n    }\n\n}\n```
['Java']