Domanda di colloquio di McDonald's

Asked me to code a solution involving binary search