Domanda di colloquio di Uber

Round 1: graph based question, required knowledge of modified bfs.