Pregunta de entrevista de Stockly

a very classical binary search question