Dijkstra's algorithm: Difference between revisions

→‎{{header|Forth}}: correct data to match what's provided in the description
(→‎{{header|Forth}}: Handle case when not all nodes are reachable.)
(→‎{{header|Forth}}: correct data to match what's provided in the description)
Line 3,495:
'a , 'c , 9 , edge-count 1+!
'a , 'f , 14 , edge-count 1+!
'b , 'c , 10 , edge-count 1+!
'b , 'd , 15 , edge-count 1+!
'c , 'd , 11 , edge-count 1+!
Line 3,654 ⟶ 3,655:
Shortest path to each vertex from b:
a: ∞ (unreachable)
c: 10 (unreachablec←b)
f: 3012 (f←e←d←bf←c←b)
d: 15 (d←b)
e: 21 (e←d←b)
1,480

edits