I donot know the error

Ide:-https://ide.geeksforgeeks.org/ocUOXZq16f

Hello @manikjindal49 i have corrected your code and commented the mistake:


Happy Learning!!

But still it is showing wrong output

@manikjindal49 yes i know i thought you were concerned about the error only.
wait i will check your code for that also.

yes please check it i think i have written properly

@manikjindal49 you have not understood the question properly because you dont have to check for the whole string every time.
but you have to check from l to r only which are given in the input.


check the above code:
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.