Calculate minimum time for all nodes to receive a signal using Dijkstra's Algorithm.
You are given a network of `n` nodes, labeled from `1` to `n`. You are also given `times`, a list of travel times as directed edges. Return the minimum time it takes for all the `n` nodes to receive the signal.
Invariant: When a node is popped from the min-heap, its shortest path distance is permanently settled.
Dijkstra guarantees shortest paths in non-negative weighted graphs in O(E log V) time.
Bottleneck: Heap operations per edge.
Calculate minimum time for all nodes to receive a signal using Dijkstra's Algorithm.
You are given a network of `n` nodes, labeled from `1` to `n`. You are also given `times`, a list of travel times as directed edges. Return the minimum time it takes for all the `n` nodes to receive the signal.
Invariant: When a node is popped from the min-heap, its shortest path distance is permanently settled.
Dijkstra guarantees shortest paths in non-negative weighted graphs in O(E log V) time.
Bottleneck: Heap operations per edge.
Initialized 2D Grid map. Scanning for unvisited land cells ('1').