DSA
Weighted shortest-path algorithms — Dijkstra's for non-negative edges, Bellman-Ford when negative weights are in play.
The shortest path problem is famous in the field of computer science.
Dijkstra's shortest path algorithm was invented in 1956 by the Dutch computer scientist Edsger W. Dijkstra during a twenty minutes coffee break, while out shopping with his fiancée in Amsterdam.
The Bellman-Ford algorithm is best suited to find the shortest paths in a directed graph, with one or more negative edge weights, from the source vertex to all other vertices.