Test case 4 wrong answer

I have corrected my code to ensure that it searches for the upper and the lower bounds using binary search, but the answer seems wrong

see this: