Given a binary array a of size n and an integer m. Find the maximum number of consecutive 1's produced by flipping at most m 0's. Leetcode
Answers
Answered by
0
Step-by-step explanation:
Given a binary array and an integer m, find the position of zeroes flipping which creates maximum number of consecutive 1's in array. Examples : Input: arr[] = {1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1} m = 2 Output: 5 7 We are allowed to flip maximum 2 zeroes.
Similar questions