You might want to look at examples of topological sorting, it should be easy enough to find online; even /usr/src/usr.bin/tsort/tsort.c on FreeBSD. tsort is rarely used but useful on occasion.
__________________
My Journal
Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
|