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
| Category | Algorithm |
| Difficulty | Hard |
| Binary heap | O((V + E) log V) |
| Requires | non-negative weights |
| Negative edges | use 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.