Google Interview Question

DFS based graph/tree question. Dijsktra's algorithm