Time limit exceed

Wrote same code still showing time limit exceed.

@kunalshrivastava you are forgetting to increment i,
so also do i++ in while loop.

1 Like

Thanks @mayankA47, Still not working for Test case2, result TLE .


@kunalshrivastava you were increasing i at wrong place

1 Like

thanks @mayankA47,it happened in hurry.

thanks @mayankA47, it happened in hurry.

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.