Frage im Vorstellungsgespräch bei MakeMyTrip

Graph Question, Shortest Path Problem, And one pattern problem.