tcsort - topological sort
tcsort [filename]
Does a topological sort of input pairs.
For a more complete description, see the tsort(1) man page, For an explanation of the algorithm, see the Work column in the October, 1998, issue of SunExpert, or the references given below.
Jeffrey S. Haemer
tsort(1), tcsh(1), tchrist(1)
Algorithm stolen from Jon Bentley (More Programming Pearls, pp. 20-23), who, in turn, stole it from Don Knuth (Art of Computer Programming, volume 1: Fundamental Algorithms, Section 2.2.3)