Bellman–Ford algorithm: Difference between revisions

Content deleted Content added
"Robot: removed extra blank lines."
No edit summary
Line 10:
for each vertex v in G other than s,
set Distance(v) = infinity, Predecessor(v) = nil;
for i <-= 1 to |V(G)| - 1 do //|V(G)| Number of vertices in the graph
for each edge (u,v) in G do
if Distance(v) > Distance(u) + w(u,v) then