Two pointer Test cases failing

maintained two variables to keep a track of indices (one for the left end and one for the right end) and update these variables when a new length > maxlength is encountered but test cases are failing. Please debug this code…

Hi @ksalokya
I have corrected ur code --> https://ide.codingblocks.com/s/639792
Hope it clears ur doubts…

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.

may I know which test cases were failing in my code, after that you can mark this as closed.

I have modified my previous code and now only 1 test case is failing may I know what is that?

1 0
0

here o/p should be
0
0

ur o/p
0
1

alright thanks a lot. mark this as closed now.

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.