You are given an array of strings sentences, where each sentences[i] represents a single sentence.
Return the maximum number of words that appear in any single sentence.
A sentence is defined as a sequence of words separated by a single space with no leading or trailing spaces.
Constraints:
sentences.length
sentences[i].length
sentences[i] consists only of lowercase English letters and ' '.
sentences[i] does not have leading or trailing spaces.
All the words in sentences[i] are separated by a single space.
You are given an array of strings sentences, where each sentences[i] represents a single sentence.
Return the maximum number of words that appear in any single sentence.
A sentence is defined as a sequence of words separated by a single space with no leading or trailing spaces.
Constraints:
sentences.length
sentences[i].length
sentences[i] consists only of lowercase English letters and ' '.
sentences[i] does not have leading or trailing spaces.
All the words in sentences[i] are separated by a single space.