Tarjan: Difference between revisions

m
→‎{{header|REXXl}}: Use node names 0 to 7 to be compatible with other solutions
m (order entries)
m (→‎{{header|REXXl}}: Use node names 0 to 7 to be compatible with other solutions)
Line 1,031:
Do i=1 By 1 While gg>''
Parse Var gg '[' g.i ']' gg
name.i=i-1
End
g.0=i-1
Line 1,045 ⟶ 1,046:
Exit
 
strong_connect: Procedure Expose x g. index. lowlink. stacked. stack. name.
Parse Arg n
index.n = x
Line 1,073 ⟶ 1,074:
stacked.w=0
stack.0=stack.0-1
c=name.w c
If w=n Then Do
Say '['space(c)']'
Line 1,113 ⟶ 1,114:
Return</lang>
{{out}}
<pre>[0 1 2 3]
[65 76]
[43 54]
[87]</pre>
 
 
=={{header|Sidef}}==
2,295

edits