messages. Each message is made of words of lowercase English letters separated by exactly one space, with no spaces at the start or end.
Return the number of words in the message that has the most words.messages=["see you at noon", "ok", "running late sorry"] → 4
The first message has four words, the second one, the third three. The maximum is 4.
messages=["call me", "on my way", "got it"] → 3
The second message is the wordiest, with three words.
messages[i] consists of lowercase English letters and spacesmessages=["see you at noon", "ok", "running late sorry"]
4
Run checks the first 3 tests in your browser. Submit checks all 77 tests on the server, hidden ones included.