Network Delay Time (Dijkstra)
Medium
Graphs
A directed weighted network has n nodes labelled 1..n. A signal is sent from node k. Print the minimum time for all nodes to receive it, or -1 if some node can never receive it.
Constraints
1 <= k <= n <= 100 1 <= m <= 6000 0 <= w <= 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.