String Stream and hashmap || C++
\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) {\n        unordered_map<string,int> hm;\n        in
```\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) {\n        unordered_map<string,int> hm;\n        int n = messages.size();\n        for(int i=0;i<n;i++){\n            istringstream ss(messages[i]);\n            string temp;\n            int cnt = 0;\n            while(getline(ss,temp,\' \')){\n            cnt++;\n            }\n            hm[senders[i]] += cnt;\n        }\n        int mx = INT_MIN;\n        for(auto it:hm){\n            mx = max(it.second,mx);\n        }\n        string ans="";\n        for(auto it:hm){\n            if(mx == it.second){\n                if(ans < it.first){\n                    ans = it.first;\n                }\n            }\n        }\n        return ans;\n    }\n};\n```
['C']