Tarjan's strongly connected components algorithm: Difference between revisions

Content deleted Content added
Cross-edges clearly need to be considered as per the original paper. The algorithm is correct but the explanation was wrong about the case when w is not on the stack.
Line 59:
'''else if''' ''w''.onStack '''then'''
''// Successor w is in stack S and hence in the current SCC''
''// If ''w'' is not on stack, then (''v'', ''w'') is aan cross-edge inpointing theto DFSan treeSCC already found and must be ignored
''// Note: The next line may look odd - but is correct.''
''// It says w.index not w.lowlink; that is deliberate and from the original paper''