Find the longest shortest-path time from k to all nodes.
Dijkstra’s algorithm on a directed weighted graph with non-negative weights.
Compute shortest distances from k. Answer is max(dist) if all reachable, else -1.
Dijkstra produces shortest paths with non-negative edges; the network delay is the slowest among them.
Find the longest shortest-path time from k to all nodes.
Dijkstra’s algorithm on a directed weighted graph with non-negative weights.
Compute shortest distances from k. Answer is max(dist) if all reachable, else -1.
Dijkstra produces shortest paths with non-negative edges; the network delay is the slowest among them.