C++| EASY TO UNDERSTAND |fast and efficient code| Using hashtables
Please upvote to motivate me in my quest of documenting all leetcode solutions. HAPPY CODING:)\nAny suggestions and improvements are always welcome\n```\nclass 
**Please upvote to motivate me in my quest of documenting all leetcode solutions. HAPPY CODING:)\nAny suggestions and improvements are always welcome**\n```\nclass Solution {\npublic:\n    vector<vector<string>> groupAnagrams(vector<string>& strs) {\n        unordered_map<string,vector<string> > mp;\n        string t;\n        for(int i=0;i<strs.size();i++)\n        {\n             t=strs[i];\n             sort(t.begin(),t.end());\n             mp[t].push_back(strs[i]);\n        }\n        vector<vector<string>> ans;\n        for(auto pr:mp)\n        {\n            ans.push_back(pr.second);\n        }\n    return ans;\n    }\n};
['C']