Pergunta de entrevista da empresa Google

DFS based graph/tree question. Dijsktra's algorithm