Dijkstra’s Algorithm

Map of notes covering Dijkstra’s shortest-path algorithm — the foundational greedy approach for single-source shortest paths in non-negative-weight graphs.

Foundational

Implementation

Comparison & Context

Quick Decision Guide

SituationUse
Single-source, non-negative weightsDijkstra
Single-source, negative weightsBellman-Ford Algorithm - Edge Relaxation Pattern
All-pairs shortest pathsFloyd-Warshall - All-Pairs Dynamic Programming
Unweighted graphBFS as Wavefront Propagation
Heuristic available (target-known)A* (Dijkstra + heuristic)