Dijkstra’s Algorithm
Learn how Dijkstra’s algorithm works.
In this lesson, we look at another algorithm for solving the single-source shortest-paths problem called Dijkstra’s algorithm. Dijkstra’s algorithm is the preferred algorithm for finding the shortest paths from a single source because it also works for digraphs that have cycles. However, it does fail to work for digraphs with negative edge weights. The principal idea behind Dijkstra’s algorithm appears, in its rudimentary form, in a 1959
Get hands-on with 1400+ tech skills courses.