← All problems
Network Delay Time (Dijkstra)
Time for a signal from node k to reach all nodes (directed weighted edges); -1 if unreachable.
Complexity
Time O(e log n), Space O(n+e)
Common pitfalls
- Dijkstra with negative weights
- Not skipping stale heap entries
Your solution
Log in to save your code and track progress.