LC: 487. Max Consecutive Ones II
https://leetcode.com/problems/max-consecutive-ones-ii/
Input: nums = [1,0,1,1,0]
Output: 4
Explanation: Flip the first zero will get the maximum number of consecutive 1s. After flipping, the maximum number of consecutive 1s is 4.Input: nums = [1,0,1,1,0,1]
Output: 4PreviousLC: 159. Longest Substring with At Most Two Distinct CharactersNextLC: 624. Maximum Distance in Arrays
Last updated