Dijkstra's algorithm ( DYKE -strəz) is an algorithm for finding the
shortest paths between nodes in a weighted graph, which may represent, for
example, road networks. It was conceived by computer scientist Edsger W.
Dijkstra in 1956 and published three years later.
The algorithm exists in many variants. Dijkstra's original algorithm found the
shortest path between two given nodes, but a more common variant fixes a
single node as the "source" node and finds shortest paths from the source to
all other nodes in the graph, producing a shortest-path tree.
For a given source node in the graph, the algorithm finds the shortest path
between that node and every other.