Pregunta de entrevista de Solution Street

Coding exercise was a simple data structure problem