Solution in Python | Hashmap | Sorting
\nclass Solution:\n    def largestWordCount(self, messages: List[str], senders: List[str]) -> str:\n        leng = len(senders)\n        freq = {}\n        for 
```\nclass Solution:\n    def largestWordCount(self, messages: List[str], senders: List[str]) -> str:\n        leng = len(senders)\n        freq = {}\n        for i in range(leng):\n            sender = senders[i]\n            msg = messages[i]\n            msg_len = len(msg.split())\n            if sender in freq:\n                freq[sender] += msg_len\n            else:\n                freq[sender] = msg_len\n            \n            \n        max_sender_len = float(\'-inf\')\n        max_sender_name = \'\'\n        \n        for sender in freq:\n            if freq[sender] > max_sender_len:\n                max_sender_len = freq[sender]\n                max_sender_name = sender\n            elif freq[sender] == max_sender_len:\n                temp = sorted([sender, max_sender_name], key=str, reverse=True)\n                max_sender_name = temp[0]\n                \n        return max_sender_name\n```
['Sorting', 'Python', 'Python3']