Pregunta de entrevista de Longchamp

How did you solve the difficult problem?