Dijkstra’s Shortest Path Algorithm
What is Dijkstra’s Algorithm Dijkstra’s Algorithm is the algorithm to find the shortest path between any two vertices in a graph.
Dijkstra’s Algorithm will find the shortest path from a given starting vertex to every other vertices in a graph.
Steps Prepare a table to have the shortest distance from a starting vertex and previous vertex.
Initialize two list of visited and unvisited nodes
Let the distance of a start vertex from the start vertex 0.