Pregunta de entrevista de Bloomberg

One program with data structures in HackerRank