Pregunta de entrevista de Google

DFS based graph/tree question. Dijsktra's algorithm