Can't understand what is wrong?

can you explain to me what’s wrong in my approach?

@lakshay2311 You have to take s as the max element of that array and since it is not sorted your ans might be wrong .

hold on lemme check once again

Still not accepting the test cases

@lakshay2311 Can u send me your updated code. THis is such a simple question dude of binary search if you wouldn’t do it yourself you wouldn’t learn .

Bro, I have done it relax.

I have closed the doubt.

@lakshay2311 Alright. Great!