Binary Search Question Leetcode Sql Problems