Order the steps of Dijkstra's algorithm
Exercise and reference answers
- Steps
- Initialise distances: source = 0, all others = ∞
- Mark all nodes as unvisited
- Pick the unvisited node with smallest tentative distance
- Update distances of its neighbours through that node
- Mark current node as visited
- Repeat until all reachable nodes are visited