You are given two string arrays, messages and senders, each of length n. The messages[i] was sent by the sender senders[i].
A message is a string of words separated by single spaces, with no leading or trailing spaces. The word count of a message is defined as the total number of words it contains.
Return the name of the sender with the largest total word count. If multiple senders share the maximum total word count, return the sender with the lexicographically largest name.
Note: Lexicographical order is based on ASCII values, where uppercase English letters are considered smaller than lowercase English letters.
Constraints:
n messages.length senders.length
n
messages[i].length
senders[i].length
messages[i] consists of uppercase and lowercase English letters and ' '.
All the words in messages[i] are separated by a single space.
messages[i] does not have leading or trailing spaces.
senders[i] consists of uppercase and lowercase English letters only.
You are given two string arrays, messages and senders, each of length n. The messages[i] was sent by the sender senders[i].
A message is a string of words separated by single spaces, with no leading or trailing spaces. The word count of a message is defined as the total number of words it contains.
Return the name of the sender with the largest total word count. If multiple senders share the maximum total word count, return the sender with the lexicographically largest name.
Note: Lexicographical order is based on ASCII values, where uppercase English letters are considered smaller than lowercase English letters.
Constraints:
n messages.length senders.length
n
messages[i].length
senders[i].length
messages[i] consists of uppercase and lowercase English letters and ' '.
All the words in messages[i] are separated by a single space.
messages[i] does not have leading or trailing spaces.
senders[i] consists of uppercase and lowercase English letters only.