length[i] = length of current shortest path from v1 to vi using only intermediate vertices from the subtree of vertices with known shortest vertices
touch[i] = index of last vertex in the subtree on current shortest path from v1 to vi
Initially, the length and touch arrays are shown below. Complete the trace of the algorithm.
2. What is the run-time of the above algorithm?