c++ | easy | short
\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) \n    {\n        unordered_map<string,int>mp;\n     
```\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) \n    {\n        unordered_map<string,int>mp;\n        int size = messages.size();\n        int words=0;\n        int val=0;\n        string ans="";\n        string str;\n        for(int i=0;i<size;i++)\n        {\n            str = messages[i];\n            words=0;\n            for(int j=0;j<str.length();j++)\n            {\n                if(str[j]==\' \')\n                {\n                    words++;\n                }\n            }\n            words++;\n            mp[senders[i]]+=words;\n            if(val<mp[senders[i]])\n            {\n                val=mp[senders[i]];\n                ans=senders[i];\n            }\n            else if(val==mp[senders[i]] and senders[i]>ans)\n            {\n                ans=senders[i];\n            }\n        }\n        return ans;\n    }\n};\n```
['C', 'C++']