Dijkstra's algorithm: Difference between revisions

m
(Added Easylang)
(One intermediate revision by the same user not shown)
Line 3,312:
a = (strcode substr s$ 1 1) - 96
b = (strcode substr s$ 3 1) - 96
d = number substr s$ 5 -19
if a > len con[][]
len con[][] a
Line 3,323:
.
read
#
len cost[] n
len prev[] n
#
proc dijkstra . .
for i = 2 to len cost[]
Line 3,356:
.
dijkstra
#
func$ gpath nd$ .
nd = strcode nd$ - 96
while nd <> 1
s$ = " -> " & strchar (nd + 96) & s$
nd = prev[nd]
.
Line 3,367:
print gpath "e"
print gpath "f"
#
input_data
a b 7
Line 3,380:
 
</syntaxhighlight>
 
 
=={{header|Emacs Lisp}}==
2,023

edits