Loading page…
A maps app needs the cheapest route for couriers, not the one with the fewest roads. Dijkstra's algorithm keeps a min heap of waiting distances, calls the smallest final, and relaxes the roads that leave it. A negative cost breaks it, and Bellman-Ford handles that with rounds of relaxing every road. The lecture runs both step by step, shows why they work, what they cost, and the classic mistakes.
A courier is on the way to a customer.