easy cpp solution count method
\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) \n    {\n        string name="";\n        int ans=IN
```\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) \n    {\n        string name="";\n        int ans=INT_MIN;\n        unordered_map<string,int>mp;\n        for(int i=0;i<messages.size();i++)\n        {\n            int val = count(messages[i].begin(),messages[i].end(),\' \')+1;\n            mp[senders[i]]+=val;\n            if(mp[senders[i]]>ans or (mp[senders[i]]==ans and senders[i]>name))\n            {\n                ans=mp[senders[i]];\n                name=senders[i];\n            }\n        }\n        return name;\n    }\n};\n```
['C', 'C++']