Topological sort: Difference between revisions
Content added Content deleted
m (→{{header|zkl}}: add space) |
|||
Line 4,230: | Line 4,230: | ||
Input data is munged |
Input data is munged |
||
<lang zkl>fcn topoSort(data){ // data is L( L(root,L(leaves)),...) |
<lang zkl>fcn topoSort(data){ // data is L( L(root,L(leaves)),...) |
||
allDs:=data.pump(List,fcn(rds){T(Void.Write,Void.Write,rds[1])}).copy(); |
allDs:=data.pump(List,fcn(rds){ T(Void.Write,Void.Write,rds[1]) }).copy(); |
||
roots:=D(data); // dictionary of root:leaves |
roots:=D(data); // dictionary of root:leaves |
||
L:=List(); |
L:=List(); |