Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    print "@output\n";
    @output= tsort( [1,2,3,4], [1,3,2,4] );
    print "@output\n";
    
  2. or download this
    1 2 3 4 5 6
    Data contains a cycle, breaking at 2.
    1 2 3 4