Concept Flow - Dijkstra's Algorithm Single Source Shortest Path
Start: Initialize distances
Set source distance = 0
Add all nodes to unvisited set
While unvisited not empty
Select node with smallest distance
For each neighbor
Calculate new distance
If new distance < known distance
Update distance and predecessor
Mark current node visited
Repeat until all visited
Shortest paths found
Dijkstra's algorithm starts with all nodes at infinite distance except the source. It repeatedly picks the closest unvisited node, updates neighbors' distances, and marks nodes visited until all shortest paths are found.
