Hard

Dijkstra's Algorithm

Dijkstra grows a set of settled vertices by always settling the closest unsettled one. Edge weights must be non-negative. A binary heap keeps the frontier ordered.

Costs

CategoryAlgorithm
DifficultyHard
Binary heapO((V + E) log V)
Requiresnon-negative weights
Negative edgesuse Bellman-Ford

Questions

What is Dijkstra's Algorithm?

Dijkstra grows a set of settled vertices by always settling the closest unsettled one. Edge weights must be non-negative. A binary heap keeps the frontier ordered.

Where do I practice it?

DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.