Dijkstra's algorithm: Difference between revisions

Content added Content deleted
No edit summary
mNo edit summary
Line 2,139: Line 2,139:


(calculate-shortest-path)
(calculate-shortest-path)
</lisp>
</lang>


outputs:
outputs:


<pre>from a to e:
<pre>
from a to e:
shortest distance: 26
shortest distance: 26
shortest route: (a c d e)
shortest route: (a c d e)
Line 2,150: Line 2,151:
shortest distance: 11
shortest distance: 11
shortest route: (a c f)
shortest route: (a c f)
--</pre>
--
</pre>


=={{header|Erlang}}==
=={{header|Erlang}}==