Getting TLE error
Exist or Not test case not passing
hi dhiraj
just add a small condition in the while loop
while(q-- && q>-1)
{
rest is same
}
why so after it reaches 0 it should automtically terminate na?
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.
you did not reply to my doubt and closed the doubt
i could not get the notification about your reply so i didn’t came to know that you replied.
the condition is so because of some testcases already built in. the new testcases would be updated soon.
hi @TheAlgo if your doubt is clear you can mark it resolved and rate your experience accordingly . the rating option will be there when you mark your doubt resolved