Learnacy Lab

Shortest Path (Dijkstra) · Computer Science

With edge weights as costs, Dijkstra settles the nearest node first and relaxes its edges, so the fewest-hops route is often not the cheapest.