Upper Bound Binary Search Leetcode