Graph Algorithms & Shortest Paths

Single-Source Dijkstra's Algorithm

Finds the shortest paths from a single source vertex to all other vertices in a non-negative weighted graph. Uses a Priority Queue to greedily settle the closest unvisited node. Ties are broken alphabetically.

Slow Fast
Current Vertex: -
Priority Queue Size: 0
Settled Vertices: 0 / 6
Algorithm State: Ready
Unvisited
Evaluating / Relaxing
Settled (Visited)
Shortest Path Tree

Priority Queue Min-Heap (Distance, Label)

VertexPriority (Dist)Status

Shortest Distances Table Click any row to trace path

VertexDistancePath Via
Select a source vertex and click "Step" or "Auto Play" to begin single-source path relaxation.