McAfee Interview Question

A question based on Dijkstra's algorithm