Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Problems with sorting

by kvale (Monsignor)
on Feb 22, 2005 at 00:03 UTC ( [id://433199]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %children = (
                      'a' => [ 'b', 'c' ],
    ...
    sub children { @{$children{$_[0]} || []}; } 
    my @unsorted = ( 'z', 'a', 'x', 'c', 'b', 'y' );
    my @sorted = toposort(\&children, \@unsorted);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://433199]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (1)
As of 2024-04-24 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found