Only sample test case is failing

There is something wrong with the first lookup in the sample test case. The outer Binary search runs only twice instead of 3 times? Not sure why. Already accepted on leetcode.
Please look into this.

Hey @Siddhant_Jain You posted Concept ME question in Approach ME. Please post in the right forum

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.