class Solution:
def findMaxConsecutiveOnes(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
s = ""
for i in nums:
s += str(i)
m = max([len(j) for j in s.split("0")])
return m
leetcode - 485 - 最大连续1的个数
猜你喜欢
转载自blog.csdn.net/hustwayne/article/details/84575110
今日推荐
周排行