Uber interview question

The question was a double binary search.