How does Dijkstra Algorithm work ?
One starting point is selected in the Dijkstra algorithm. All the remaining nodes should be considered as if they are infinite distance. As we reach the nodes, we update the distances. In Dijkstra, neighbors from a node are looked at at each step and distances are updated if a shorter path is found. And again, it goes to the node closest to it. In this way, the nodes on the entire graph are circulated and the shortest path is found. Of course, an algorithm is learned on the best example.