C++ | Map | Vector of Pairs | Sorting | Easy Understanding |
```\nclass Solution {\npublic:\n    string largestWordCount(vector& m, vector& s) {\n      \n      unordered_mapmpp;\n      \n       for(int i=0;i<m.size();++i)
```\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& m, vector<string>& s) {\n      \n      unordered_map<string,int>mpp;\n      \n       for(int i=0;i<m.size();++i)\n       {\n           int cnt=0;\n        for(int j=0;j<m[i].size();++j)\n        {\n            if(m[i][j]==\' \') cnt++;\n            \n        }\n         mpp[s[i]]+=cnt+1;\n         \n       }\n      \n      vector<pair<int,string>>vp;\n      \n      for(auto it:mpp)\n      {\n        vp.push_back(make_pair(it.second,it.first));\n      \n      }\n      \n      sort(vp.begin(),vp.end());\n      \n      return vp[vp.size()-1].second ;\n    }\n};
['C++']