Pregunta de entrevista de MakeMyTrip

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