I=2 2 1 10 o=10 but my output is 11

@abhishek8181 if a certain time is valid (as checked by the “check” function), you have to look for a lower time, so you should put e = mid - 1 statement in that block, not the other way round.
Also, you are not passing any arguments in the check function.

tried ,but not worked,can u please make the changes in the code

@abhishek8181 dry run the check code too, and share the updated function

@abhishek8181 https://ide.codingblocks.com/s/251082