Pregunta de entrevista de ETAP

Asked for a difficult problem I've worked on.