slides - Computer Science - University of San Francisco
slides - Computer Science - University of San Francisco
slides - Computer Science - University of San Francisco
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
17-48: Dijkstra Running TimeTotal running time for all iterations <strong>of</strong> the inner forstatement:for (i=0; i < G.length; i++) {v = minUnknownVertex(T);T[v].known = true;|> for (e = G[v]; e != null; e = e.next) {|> if (T[e.neighbor].distance >|> T[v].distance + e.cost) {|> T[e.neighbor].distance = T[v].distance + e.cost;|> T[e.neighbor].path = v;}}}