If we just take the edgeTo edges, That's from one, to one you take zero, to five you take two, And so forth you get the shortest paths tree and that gives the shortest way to get from the source to every vertex. 