Domanda di colloquio di Intuit

It was a kinda easy graph problem.