Please give me some logic for correcting my code

Hey @sonu28sharma99
Just a small change


See this I’ve commented the change in it

If your doubt is resolved please mark it as closed.

Now it fails 1 test case…what to do sir…?

@sonu28sharma99
I checked the code against all test case
This code gave right answer
Might be some problem with the checker
I’ll forward the query
Please move on to other questions now and close the doubt unless you need any other help

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.