2. Overview
A graph search algorithm that solves the single source shortest path
problem for a graph with non negative weight edges.
This algorithm works on both directed and undirected graph.
This Algorithm can be solved by both dynamic programming and greedy
approach.
3. Single source shortest path problem
The problem of finding shortest path from source vertex to every other vertex
in a graph G.
Image credit: http://dyewrv1redcbt.cloudfront.net//wp-content/uploads/Fig-11.jpg
6. Complexity and When to use which?
Greedy Approach: When we have to find a shortest path from source to
destination vertex in a graph.
Dynamic programming: When we have to find shortest path from source to
every other vertex in a graph with heuristics function is equal to zero.
A* : When we have to find shortest path from source to destination vertex
in a graph with some heuristics.
Using Adjacency Matrix: O(V^2)
Using Priority queue : O(ElogV)
12. References
Introduction to Algorithms Book by Charles E. Leiserson, Clifford Stein,
Ronald Rivest, and Thomas H. Cormen
http://www.geeksforgeeks.org/greedy-algorithms-set-6-dijkstras-shortest-
path-algorithm/
https://www.quora.com/What-are-the-real-life-applications-of-Dijkstras-
algorithm