Simple C++| Detailed Explanation | Unordered Map | Sorting
\t\u2705 PLEASE UPVOTE IF YOU LIKE! \u2705\n\n\t\nclass Solution {\npublic:\n    vector<vector<string>> groupAnagrams(vector<string>& strs) {\n        \n       
# \t\u2705 PLEASE UPVOTE IF YOU LIKE! \u2705\n```\n\t\nclass Solution {\npublic:\n    vector<vector<string>> groupAnagrams(vector<string>& strs) {\n        \n       vector<vector<string>>ans;\n        \n       unordered_map<string, vector<string>>mp;\n        \n         /*\n                Consider example 1 : strs = ["eat","tea","tan","ate","nat","bat"]\n                \n                After the below opeartion of for loop map will contain\n                \n                aet -- eat, tea, ate\n                ant -- tan, nat\n                abt -- bat\n        */\n        \n        for(int i = 0 ; i < strs.size() ; i++)\n        {\n            string s = strs[i];\n            sort(strs[i].begin(),strs[i].end());\n            mp[strs[i]].push_back(s);\n        }\n        \n        //now simply put the elements  of second column of map in ans\n        \n        for(auto i : mp)\n        {\n            ans.push_back(i.second);\n        }\n\n        return ans;\n        \n    }\n};\n```
['C', 'Sorting']