Dijkstra’s Algorithm for Single Source Shortest Path
Classic algorithm for solving shortest path in weighted graphs without negative weights
A greedy algorithm (irrevocably makes decisions without considering future consequences)
Intuition:
- shortest path from source vertex to itself is 0
- cost of going to adjacent nodes is at most edge weights
- cheapest of these must be shortest path to that node
- update paths for new node and continue picking cheapest path