1 Count (Dynamic Programming)

Please help, how to print the modified array?
It is failing a few test cases.

I guess you have sent some other code by mistake… Please check…

hello @Karanveer i am sorry for that . here is the complete code for that .


i hope i have cleared your doubt .
please mark this as resolved if your doubt is cleared .
Happy Learning !!

hello @Karanveer as you are not responding to the doubt you opened a month before ,i think that your doubt is cleared and you can now mark this doubt as resolved .
on off the chance if you still have doubt you can reopen it and ask again .
Happy Learning !!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.