Takeaways
- Dijkstra's Algorithm will compute the shortest path from one vertex to every other vertex in the graph
- Dijkstra's Algorithm works by iteratively flooding out from the starting vertex, and keep track of the current shortest paths ("best estimates") to each vertex.
- Dijkstra's Algorithm runs in polynomial time
- A* ("A star") is another shortest path algorithm that makes decisions based on a heuristic (euclidiean distance, manhattan distance, etc)
Code
April 3rd code uses Dijkastra's algorithm to compute the shortest path of a directed weighted graph.