https://ide.codingblocks.com/s/95796 here is the code
Code not passing all test cases
hey @sans_sehgal, constraints of code is high, and your logic also incorrect as jumps in while loop are not linear.
I have made changes to your code. You can check them here.https://ide.codingblocks.com/s/96316
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.