Dijkstra’s Algorithm

Computes shortest paths from a source in a graph with nonnegative edge weights.

Method

Use priority queue; repeatedly finalize nearest unsettled node and relax outgoing edges.

Applications

Routing, logistics, network analysis, GIS.

Advantages

Optimal for nonnegative weights; reliable and well understood.

Limitations

Cannot handle negative edges; may explore many irrelevant nodes.

Alternatives

Bellman-Ford, A*, Johnson's algorithm, contraction hierarchies.

Example

A->B (4), A->C (1), C->B (2): shortest A->B is 3 via C, not 4 direct.

Sources

Educational reference only, not professional advice.

All algorithms