Pregunta de entrevista de Buckhill

Algorithm question, can't remember which one