Question d’entretien chez McDonald's

Asked me to code a solution involving binary search