Pregunta de entrevista de Endava

Implementing data structures to solve a question