PROBLEM:Given an array of size n with 0s and 1s , flip at most k 0s to get the longest possible subarray of 1s.
Input Format
First Line : n, size of array and k Second Line : n space separated numbers (0s or 1s)
Constraints
n <= 10^5 0 <= k <= n
Output Format
First Line : Size of subarray Second Line : Array after flipping k 0s
Sample Input
10 2
1 0 0 1 0 1 0 1 0 1
Sample Output
5
1 0 0 1 1 1 1 1 0 1
solution:https://ide.codingblocks.com/s/235768
//all the testcases not giving correct ans,few are giving AC,few are not.Help me to solve the problem with this code