Question d’entretien chez Apple

Got asked a binary search leetcode question.