We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f23f1b commit d46a20dCopy full SHA for d46a20d
Python/maximum-number-of-words-found-in-sentences.py
@@ -0,0 +1,10 @@
1
+# Time: O(n)
2
+# Space: O(1)
3
+
4
+class Solution(object):
5
+ def mostWordsFound(self, sentences):
6
+ """
7
+ :type sentences: List[str]
8
+ :rtype: int
9
10
+ return 1+max(s.count(' ') for s in sentences)
0 commit comments