Algorithm: similar to shortest path.

Extra info for each entry in READY: length of shortest known path to this node from any node in the tree built so far. Note that the shortest path to the nearest node N is always a single edge.

  1. Pick any node X as your starting point. Place <X,empty path,0> on READY.

  2. Pick <N,P,L> on READY with minimum L.

  3. Repeat step 2 until READY is empty.