Controls
- Press T to toggle auto/manual mode
- Press the Up/Down arrow keys to change speed
- Press Press the Left/Right arrow keys to step forward/back in manual mode
Dijkstra's Algorithm Explanation
The goal of Dijkstra's Algorithm is to find the shortest distance from a source
node to every other node, in a weighted graph.
First, we initialize the distance to the source node to 0.
Then, at each iteration of the algorithm, we pick the unvisited node with the least
distance, and
- Mark it as visited
- For each adjacent node, attempt to reduce the distance to it with distance
to the current node, plus the weight of the edge to the adjacent node