AlgoMaster Logo

Bellman-Ford Algorithm

graph={"1":[["2",4],["3",3]],"2":[["3",-2],["4",4]],"3":[["4",2]],"4":[]},source=1
0 / 28
algomaster.io
Step:Initialize distances: source "1" = 0, all others = ∞