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-39: Dijkstra’s AlgorithmGiven the “path” field, we can construct theshortest pathWork backward from the end <strong>of</strong> the pathFollow the “path” pointers until the start node isreachedWe can use a sentinel value in the “path” field<strong>of</strong> the initial node, so we know when to stop