C++ Solution || Easy Explained || using maps.
we create a new function to count total number of words in a string;\n2.  we create a a map PerUserWordCount and a vector maxCounter;\n3.  we put all the count 
1. we create a new function to count total number of words in a string;\n2.  we create a a map PerUserWordCount and a vector maxCounter;\n3.  we put all the count of words per user in the map, while doing so , we also save the maximum frequency.\n4.  we also check that if a multiple senders have maximum words, if so then we sort them and return the last of them as required.\n\n``` \nint numberOfWords(string s){\n    string word = "";\n    int count  = 0;\n    for(int i = 0; i < s.size();i++){\n        if(s[i] == \' \' && word != ""){\n            word = "";\n            count++;\n        }\n        word = word + s[i];\n    }\n    count++;\n    return count;\n}\n\n\nclass Solution {\npublic:\n    string largestWordCount(vector<string>& messages, vector<string>& senders) {\n        map<string, int> PerUserWordCount;\n        vector<string>maxCounter;\n        int maxCount = 0;\n        for(int i = 0; i < messages.size(); i++){\n            string message = messages[i];\n            PerUserWordCount[senders[i]] = PerUserWordCount[senders[i]] + numberOfWords(message);\n            if(PerUserWordCount[senders[i]] > maxCount){\n                maxCount = PerUserWordCount[senders[i]];\n            }\n        }\n\n        for(auto i : PerUserWordCount){\n            if(i.second == maxCount){\n                maxCounter.push_back(i.first);\n            }\n        }\n\n        if(maxCounter.size() == 1){\n            return maxCounter[0];\n        }else{\n            sort(maxCounter.begin(), maxCounter.end());\n            return maxCounter[maxCounter.size()-1];\n        }\n\n        return "";\n    }\n};  ```
['String', 'C', 'Iterator']