/ http://en.wikipedia.org/wiki/Tarjan's_strongly_connected_components_algorithm / find strong-connected components in a directed graph (not the tarjan algorithm) g:flip( `a`b; `b`c; `c`a; `d`b; `d`c; `d`e; `e`d; `e`f; `f`g; `g`f; `h`e; `h`g; `h`h) h:flip( `a`b; `a`c; `b`c; `b`d; `c`e; `e`f; `f`g; `g`h; `h`e) cc:{raze(){$[z in raze over y;y;y,enlist cr[x;0#`;z]]}[x]/distinct raze x} cr:{$[z in y;(();enlist y)z=first y;raze .z.s[x;y,z]each x[1]where z=x 0]} cc g cc h \ (`a`b`c;`d`e;`f`g;,`h) ,`e`f`g`h cc:{,/(){$[z in,//y;y;y,,cr[x;0#`;z]]}[x]/?,/x} cr:{$[z in y;(();,y)z=*y;,/.z.s[x;y,z]'x[1]&z=x 0]}