solution
\nvector<vector<string> > Anagrams(vector<string>& str) {\n        vector<vector<string>> ans;\n        unordered_map<string,vector<string>> mp;\n        \n    
```\nvector<vector<string> > Anagrams(vector<string>& str) {\n        vector<vector<string>> ans;\n        unordered_map<string,vector<string>> mp;\n        \n        for(auto x: str)\n        {\n            string temp = x;\n            sort(x.begin(),x.end());\n            mp[x].push_back(temp);\n        }\n        for(auto x: mp)\n        {\n            ans.push_back(x.second);\n        }\n        return ans;\n    }\n    \n    // for this example the map will be\n    // example:- N = 5\n    // words[] = {act,god,cat,dog,tac}\n    \n    // The map will be:- \n    // string     vector<string>\n    // act        cat tac\n    // god        dog\n\t```
[]