Simple C++ Solution
Basically, just create a map keyed by all of the sorted and unique words, and its value corresponds with a vector consisting of all the strings that when sorted
Basically, just create a map keyed by all of the sorted and unique words, and its value corresponds with a vector consisting of all the strings that when sorted, results in the key.\n\n```\nclass Solution {\npublic:\n    vector<vector<string>> groupAnagrams(vector<string>& strs) {\n        vector<vector<string>> y;\n        \n        if(strs.size() == 0) return y;\n        \n        map<string,vector<string>> dict;\n        for(string s: strs)\n        {\n            string sorted = s;\n            sort(sorted.begin(),sorted.end());\n            dict[sorted].push_back(s);\n        }\n        map<string,vector<string>>::iterator o = dict.begin();\n        while(o != dict.end())\n        {\n            y.push_back(o->second);\n            o++;\n        }\n    \n        return y;\n    }\n};\n```
['C', 'C++']