09.07.2015 Views

slides - Computer Science - University of San Francisco

slides - Computer Science - University of San Francisco

slides - Computer Science - University of San Francisco

SHOW MORE
SHOW LESS

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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!