Dijkstra's algorithm: Difference between revisions

Content deleted Content added
more precise run time statement
Shd~enwiki (talk | contribs)
mNo edit summary
Line 42:
1 S = empty sequence
2 u := t
3 S = Su + S /* insert u to the beginning of S */
4 '''if''' u == s
5 end
Line 48:
7 goto 3
 
Now sequence S has the shortest path from s to t.
Then read the sequence S in reverse order.