Uber Interview Question

Asked binary search leetcode, common question