Help Create a graph and then click a starting and ending node to see Dijkstra's algorithm find the shortest distance between them. Initially each node with have infinite distance since the algorithm has not yet found a path to that node.

Then click next visit each node connected to the starting point. Those nodes will now have a finite distance. Click next to move to the closest node (which will have a black border). Click next again to visit all of its neighbors. More nodes will have finite distance values as the algorithm has found a path.

Repeat and more nodes will have distances and some will get shorter as new paths are found. Eventually the final node will get a distance. After potentially a few more rounds where the distance may decrease, the algorithm will have found the shortest path and terminate.

Nodes: Edge Prob: