Given a binary array nums and an integer k, return the maximum number of consecutive 1's in the array if you can flip at most k 0's.
Example 1
Input: nums = [1,1,1,0,0,0,1,1,1,1,0], k = 2
Output: 6
Explanation: Flip the 0s at indices 5 and 10. Indices 5 through 10 then read 1, 1, 1, 1, 1, 1, a run of 6.
Example 2
Input: nums = [0,0,1,1,0,0,1,1,1,0,1,1,0,0,0,1,1,1,1], k = 3
Output: 10
Explanation: Flip the three 0s at indices 4, 5 and 9. Indices 2 through 11 then become ten consecutive 1s.
Example 3
Input: nums = [1,1,1], k = 0
Output: 3
Explanation: The array is already all 1s, so no flips are needed and the run has length 3.
Maintain a window with at most k zeros. Expand right; when zeros exceed k, shrink left.
Run checks all cases above. Submit evaluates all test cases.