Explanation of the shortest path tree

The table below shows the shortest path tree from node 0 to all other nodes in the graph. In each iteration, a new node is added to the tree, and the distance to that node from all nodes adjacent to it are updated. The shortest path from a node to the source node 0 is entirely within this (growing) tree. Refresh the page to see another randomly generated unweighted graph.

0123456789
0infinfinfinfinfinfinfinfinf
01infinfinfinf12infinfinf
0117inf17inf12infinfinf
01172317inf12infinf14
011723173312infinf14
01172317181220inf14
01172317181220inf14
011723171812202414
011723171812202414
011723171812202414

The order in which the shortest paths are added: 0, 1, 6, 9, 2, 4, 5, 7, 3, 8.