NeetCode #225LC-487MediumSliding WindowNC Algo100
← Back to All Problems#225 · #487 · Max Consecutive Ones II(最大连续 1 的个数 II)
📌 Problem Statement & Constraints
Given a binary array
nums, return the maximum number of consecutive 1s obtainable if you can flip at most one 0. Constraints: 1 <= nums.length <= 10^5.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!