Apple interview question

Got asked a binary search leetcode question.