C++ || Map || count space || Easy-to-understand
\nclass Solution {\npublic:\n    int solve(string &s){\n        int n=s.length();\n        int cnt=1;\n        for(int i=0;i<n;i++){\n            if(s[i]==\' \'
```\nclass Solution {\npublic:\n    int solve(string &s){\n        int n=s.length();\n        int cnt=1;\n        for(int i=0;i<n;i++){\n            if(s[i]==\' \'){\n                cnt++;\n            }\n        }\n        return cnt;\n    }\n    string largestWordCount(vector<string>& messages, vector<string>& senders) {\n          int n=messages.size();\n          int m=senders.size();\n          map<string,int> mp;\n          string res="";\n          for(int i=0;i<n;i++){\n              mp[senders[i]]=mp[senders[i]]+solve(messages[i]);\n          }\n         int maxx=INT_MIN;\n         for(auto it=mp.begin();it!=mp.end();it++){\n             if(it->second>=maxx){\n                 maxx=it->second;\n                 res=max(res,it->first);\n             }\n         }\n        return res;\n    }\n};\n```
[]