the node with the shortest distance yet unvisited is node the adjacent nodes of are nodes and but node has already been visited as suchwe focus on finding the shortest distance from the starting node to node we calculate this distance by adding the distance from node to to the distance from node to this sums up to which is less than thuswe update the with and replace with in node ' previous node column node is now marked as visited here is the updated table up to this pointnode shortest distance from source previous node none nowthe two unvisited nodes are and in alphabetical orderwe choose to examine because both nodes have the same shortest distance from the starting node howeverall the adjacent nodes of have been visited thuswe have nothing to do but mark node as visited the table remains unchanged at this point lastlywe take node and find out that all its adjacent nodes have been visited too we only mark it as visited the table remains unchangednode shortest distance from source previous node none