Dijkstra's algorithm: Difference between revisions

Content deleted Content added
m lang tag
Sonia (talk | contribs)
m →‎{{header|Go}}: directed graph
Line 525: Line 525:
{"e", "f", 9},
{"e", "f", 9},
}
}
directed := false
directed := true
start := "a"
start := "a"
end := "e"
end := "e"
Line 710: Line 710:
return r
return r
}</lang>
}</lang>
{{out}}
Output:
<pre>
<pre>
Undirected graph with 6 nodes, 9 edges
Directed graph with 6 nodes, 9 edges
Shortest path(s):
Shortest path(s):
[a c f e] length 20
[a c d e] length 26
</pre>
</pre>