Doubt doubt doubt

code is working fine. I just have a doubt in line 41…can you please check…

@parth_tyagi line no 41 is maintaning ans for each index i you visit in your foor loop
it basically checks what operations you need here and then max the ans with operations needed by any other index before than i and the total ans will me max() of all these answers like if a index need 1 other 2 and other one 3 then ans will be 3 because in 3 all of then can do their work completly
if your issue still exists let me know and if clear please mark it as resolved and rate my experience

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.