Amazon interview question

Problem solving : Listas y Grafos