8 2 1 0 1 1 0 0 1 1
Flip the zeros at positions 5 and 6. Then positions 3 through 8 are all ones, giving length 6.
6
5 0 1 1 0 1 1
No flips are allowed, so the longest existing all-one block has length 2.
2
4 4 0 0 0 0
All four zeros may be flipped, so the entire array becomes a block of length 4.
4
Given a binary array, flip at most kkk zeros to ones. Find the maximum length of a contiguous segment containing only ones after the flips.