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
0infinf13infinf17172inf
03inf13inf617172inf
03inf131361717217
03inf131261717216
0330131261717216
0330131261717216
0330131261717216
0330131261717216
0329131261717216

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