How to find max consecutive 1’s with Kth allowed zero flip ?
[Question] In a. Given a binary array nums and an integer k, find the maximum number of consecutive 1‘s in the array & you can flip at most k 0‘s.Example: – var arrMix = [1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1] var arrCount = 11 var maxZeros = 2Hence the output will be 8 i.e 1, 1, […]
How to find max consecutive 1’s with Kth allowed zero flip ? Read More »