Python3 - Clear solution using dictionaries for word count per sender
At first glance, I thought that I can get the solution by making one loop over zip(messages, senders) and finding the sender with the maximum word count, But I 
At first glance, I thought that I can get the solution by making one loop over `zip(messages, senders)` and finding the sender with the maximum word count, But I realized that this won\'t work because a sender can send multple messages. Therefore, I had to create a dictionary to track the word count of each sender, then find the sender with the biggest word count.\n\nAnother thing to note is that I don\'t need to split the message into a list of words then get the length of that list. I can simply get the number of words by counting the number of spaces between each word then adding one to it. Therefore I won\'t need extra memory to store the words list in order to get its length. I thought about using generators instead of lists, but I think this approach in much simpler. \n\n```python\nclass Solution:\n    def largestWordCount(self, messages: List[str], senders: List[str]) -> str:\n        word_count = {}\n        \n        for message, sender in zip(messages, senders):\n            message_word_count = message.count(" ") + 1\n            word_count[sender] = word_count.get(sender, 0) + message_word_count\n            \n        top_sender = ""\n        max_count = 0\n        \n        for sender, wc in word_count.items():\n            if wc > max_count or (wc == max_count and sender > top_sender ):\n                top_sender = sender\n                max_count = wc\n                \n        return top_sender\n```\n\n**Time complexity:** `O(nm)` where `n` is the length of `messages` or `senders`, `m` is the maximum message length.\nwe loop over both lists at once, counting the spaces in each message, which takes `O(m)`. so the first `for` loop takes `O(nm)`. The second loop looks for the sender with the maximum word count. the worst case is that all the names in `senders` are unique, Therefore this loop would take `O(n)`.\n\n**Space complexity:** `O(n)`\nThe created dictionary would have `n` senders at the worst case, which requires a space complexity of `O(n)`
['Counting', 'Python', 'Python3']