Pregunta de entrevista de IBM

The programming challenge also involved a simple data structures problem.