Anonymous user
Dijkstra's algorithm: Difference between revisions
→{{header|Tcl}}
Line 1,324:
=={{header|Tcl}}==
This solution is incorrect. Since the path is directed and f is only a sink, f cannot be in the middle of a path.
Note that this code traverses the entire set of unrouted nodes at each step, as this is simpler than computing the subset that are reachable at each stage.
<lang tcl>proc dijkstra {graph origin} {
|