Leetcode Binary Search With Custom