c++| Faster than 100% | Hashmap
\n\n\n\n// This function takes in two vectors of strings, "messages" and "senders", and returns the sender \n// with the largest number of words in their messag
\n\n\n```\n// This function takes in two vectors of strings, "messages" and "senders", and returns the sender \n// with the largest number of words in their messages. \nstring largestWordCount(vector<string>& messages, vector<string>& senders) {\n    // Create an unordered map to store the number of words in each sender\'s messages\n    unordered_map<string,int> mp;\n    // Iterate through the "messages" vector\n    for(int i=0;i<size(messages);i++)\n    {\n        int c=0;\n        // Count the number of spaces in the current message\n        for(int j=0;j<size(messages[i]);j++)\n        {\n            if(messages[i][j]==\' \')\n                c++;\n        }\n        // Add the number of words (count of spaces + 1) to the corresponding sender\'s count in the map\n        mp[senders[i]]+=c+1;\n    }\n    // Create a priority queue of pairs where the first element is the number of words and \n    // the second element is the sender\'s name\n    priority_queue<pair<int,string>> p;\n    // Push all the pairs from the map into the priority queue\n    for(auto it:mp)\n    {\n        p.push({it.second,it.first});\n    }\n    // Return the sender with the highest number of words (the top element of the priority queue)\n    return p.top().second;\n}\n```
['C']