C++ | | Easy solution  | | (Map and set)
\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) {\n        map<string,int> m1;\n        int maxi = 0
```\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) {\n        map<string,int> m1;\n        int maxi = 0;\n\t\t\n        for(int i=0;i<senders.size();i++){\n\t\t\t// min. no. of words per sender\n            int req = 1;\n\t\t\t\n\t\t\t// count spaces\n            for(auto &it:messages[i])   if(it==\' \') req++;\n            \n\t\t\t// insert it into map\n\t\t\tm1[senders[i]] += req;\n\t\t\t\n\t\t\t// get the max value in map\n            maxi = max(maxi,m1[senders[i]]);\n        }\n\t\t// using set for highest order string\n\t\tset<string> s1;\n\t\t\n        for(auto &it:m1){\n\t\t\n            // string correponding to max value of map\n\t\t\tif(it.second==maxi){\n                s1.insert(it.first);\n            }\n        }\n\t\t\n\t\t// last element of set\n        return *(--s1.end());\n    }\n};\n```
['C']