Have you ever wondered how does a GPS work to locate the nearest hotel or shopping mall and guide you through the shortest way there???
The Answer is ‘‘Dijkstra's Shortest Path Algorithm’’
Let’s Discuss about this algorithm…
Little bit History:
Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph , which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years later
Wondering how does it Work???
Lets See a Short Video here:
https://www.youtube.com/watch?v=zXf
DYaahsNA
Lets try one by ourselves….
We need to go from S to E in the shortest way
∞
∞
∞
∞ 1
2
6
5
∞ 6
12