1count problem dynamic programming

4 test cases are not running it shows wrong answer
plz check the code and modify it and let me know the mistake

problem : https://online.codingblocks.com/app/player/39658/content/77394/5164/code-challenge

code : https://ide.codingblocks.com/s/210013

plz reply asap


here you go i have fixed your code
see u have to first store the best window
in your earlier code you were just printing the last few elements, i.e. no matter what it will go to the last of the array to get the last right and u were printing that
plus u have to increment left only if the arr[left[ is zero otherwise not

hey @sengarankit98 if your doubt is solved, please mark it as resolved