Hash map | Ordered map | Easy to understand
\nclass Solution {\npublic:\n    void helper(string s,int &cnt)\n    {\n        for(int i=0;i<s.length();i++)\n        {\n            if(s[i]==\' \')\n         
```\nclass Solution {\npublic:\n    void helper(string s,int &cnt)\n    {\n        for(int i=0;i<s.length();i++)\n        {\n            if(s[i]==\' \')\n                cnt++;\n        }\n        if(s!="") cnt++;\n    }\n    string largestWordCount(vector<string>& messages, vector<string>& senders) {\n        map<string,int> mp;\n        for(int i=0;i<messages.size();i++)\n        {\n            string s=senders[i];\n            int cnt=0;\n            helper(messages[i],cnt);\n            mp[s]=mp[s]+cnt;\n        }\n        int x=0;\n        string ans="";\n        for(auto ele: mp)\n        {\n            if(x<=ele.second)\n            {\n                x=ele.second;\n                ans=ele.first;\n            }\n        }\n        return ans;\n    }\n};\n```
['String', 'C']