Lecture 18: Shortest Paths, Dijkstra and BFS
We discussed a slight modification to Prim’s algorithm which results in Dijkstra’s algorithm; we discussed why the algorithm is correct, and a simplification of the algorithm: when edge weights are all 1, then the algorithm simplifies to breadth-first search, which returns the shortest number of edges from a source node s to every other node in the graph.
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video