Tarjan: Difference between revisions

48 bytes removed ,  4 years ago
m
→‎{{header|Racket}}: Whoops. Fixed the typo
(+Racket)
m (→‎{{header|Racket}}: Whoops. Fixed the typo)
Line 525:
[(not index) (dfs w)
(change! node-low-link v (min (node-low-link w) _))]
[on? (change! node-low-link v (min low-linkindex _))]))
 
(when (= (node-low-link v) (node-index v))
Line 534:
(change! sccs (cons scc _))))
 
(for* ([(u vs_) (in-hash g)] #:when (not (node-index u))) (dfs u))
[w (in-list (cons u vs))]
#:when (not (node-index w))) (dfs w))
sccs)
 
Anonymous user