Problem: Network Delay Time Task: You have a network of nodes with weighted directed edges. Signal starts from node . Find the minimum time for all nodes to receive the signal.
If impossible, return . Run Dijkstra from node . The answer is the maximum distance among all reachable nodes. If any node is unreachable, return . This is a direct application of single-source shortest paths. The "delay time" is the longest shortest path from the source.