Pregunta de entrevista de Intuit

Question was about data structures, nothing too complicated