2114. Maximum Number of Words Found in Sentences

Updated: 2024-03-12
1 min read
[]

On This Page

LeetCode problem 2114

class Solution:
    def mostWordsFound(self, sentences: List[str]) -> int:
        return 1 + max(s.count(' ') for s in sentences)