Pregunta de entrevista de BlackRock

Data structure and algorithm problems, quite typical