what i have done after taking input is
-
i created an array that store the index of 1’s
-
then with the help of above array i calculated the max length subarray i got after fliping k zeros
-
and then stores them in dp nammed vector
then find max length subarray and return as output
4)then i calculated starting from which index is giving me max length subarray
- and traverse the main input array to make changes and display it
but this all is showing some test case wrong pls see