Single-source shortest path finds minimum-cost paths from one source node to every other reachable node in a weighted graph. Dijkstra’s algorithm solves this problem when edge costs are non-negative, making it useful for routing and navigation systems. section 3.4.1
Dijkstra’s search proceeds by repeatedly selecting the closest unsettled node:
- Place candidates in a priority queue ordered by cumulative distance from the source. section 3.4.1
- Continue until all nodes are processed, or stop early when a required target is reached. section 3.4.1
A small graph search
Starting from S, the search first processes S, then C, D, and A in increasing cumulative-distance order. Each step revises distances and predecessors for neighboring nodes, building a shortest-path tree. section 3.4.1

