Cruise interview question

Binary search