WHAT’S WRONG IN THE CODE…ITS GIVING TLE
BINARY SEARCH OUTPUT TLE
You are supposed to be finding mid inside the while loop for every iteration and not outside the loop.
Its still showing 2 test cases wrong
Just remove the sort function and it passes all testcases.
Even if u dont remove it … then also it works fine… u might have copied it wrong.