- Set the distance to the starting node \( a \) to 0.
- Set the distance to all other nodes to infinity.
- Mark all nodes as unvisited.
- Set the initial node as the current node.
\[
\begin{array}{cccccc}
\text{Node} & a & b & c & d & e & z \\
\text{Distance} & 0
Show more…