Skip to main content
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Algorithm for solving the single-source shortest-path problem in non-negatively weighted directed graphs

Dijkstra's algorithm is one of the standard algorithms for solving the SSSP problem, in which we are required to find the length of the shortest paths from a source node $s$ to all other nodes in the graph. The algorithm constructs a shortest path tree, from which the shortest paths can be recovered.

Dijkstra's algorithm works in weighted directed graphs as long as all weights are non-negative.