Dijkstra (jalur terpendek) Playground

Rohim’s routes from the mill on the village road map: a real binary heap, the nearest village settled, its roads relaxed, the route read back through asal…

Why it matters

Map navigation, network routing, supply chains, games: all look for the cheapest route in a weighted graph. Dijkstra is the basis, and three things often go wrong: using it with negative weights, scanning every node each step, and forgetting to keep asal for the route.

The key idea

What leaves the queue is surely shortest

Common mistakes

Try it in this playground