Maximum Consecutive Ones - 2
easy
1. You are given an array(arr) which contains only 0's and 1's and a number K. 2. You have to find the maximum number of consecutive 1's in the given array if you can flip at most K zeroes.
Constraints
1 <= N <= 10^5 0 <= arr[i] <= 1 1 <= K <= N
Format
Input
A number N arr1 arr2... N numbers A number K
Output
A number representing maximum number of consecutive 1's after flipping at most K zeroes.
Example
Sample Input
6
1 1 0 0 1 1
1
Sample Output
3
Question Video