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.
For each UNPROCESSED neighbour Ni: