Dijkstra’s algorithm is a graph algorithm which was invented by the Dutch computer scientist Edsger Dijkstra in 1959. The algorithm finds the shortest ways from one of the graph nodes to all the others.
The algorithm exists in many variants; Dijkstra’s original variant found the shortest path between two nodes but a more common variant fixes a single node as the “source” node and finds the shortest paths from the source to all other nodes in the graph, producing a shortest-path tree (wikipedia.org, 2002).
The algorithm works as follows: Continue reading