Bellman-Ford (bobot negatif) Playground

Rohim’s one-way leg costs, some negative: every round checks every leg, a table of costs per round, stopping when nothing changes. What does round V find, and…

Why it matters

Negative weights show up for real: currency rates (an arbitrage is a negative cycle), costs that can turn into income, routing protocols like RIP (distance vector). Dijkstra gives a wrong answer there with no warning; Bellman-Ford gives the right one, or tells you there is none.

The key idea

Round k settles routes of k legs

Common mistakes

Try it in this playground