1
2
3
4
5
6
|
class Solution:
def mostWordsFound(self, sentences: List[str]) -> int:
start=0
for i in sentences:
start=max(start,i.count(' '))
return start+1
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 2194. Cells in a Range on an Excel Sheet (0) | 2022.03.07 |
---|---|
leetcode 2160. Minimum Sum of Four Digit Number After Splitting Digits (0) | 2022.03.07 |
leetcode 2011. Final Value of Variable After Performing Operations (0) | 2022.03.07 |
백준 1920 수찾기 (0) | 2022.03.07 |
백준 24116 알고리즘 수업 - 피보나치 수 1 (0) | 2022.02.07 |
댓글