Binary Search Question Leetcode 150