原文:[LeetCode] Max Consecutive Ones II 最大连续1的个数之二

Given a binary array, find the maximum number of consecutive s in this array if you can flip at most one . Example : Note: The input array will only contain and . The length of input array is a posit ...

2017-02-07 22:15 2 8090 推荐指数:

查看详情

Leetcode练习(Python):第485题:最大连续1的个数:给定一个二进制数组, 计算其中最大连续1的个数

题目: 最大连续1的个数:给定一个二进制数组, 计算其中最大连续1的个数。 示例 1: 输入: [1,1,0,1,1,1]输出: 3解释: 开头的两位和最后的三位都是连续1,所以最大连续1的个数是 3.注意: 输入的数组只包含 0 和1。输入数组的长度是正整数,且不超过 10,000 ...

Tue Jun 02 00:08:00 CST 2020 0 620
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM