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

Re: Algorithm concerns

by I0 (Priest)
on May 03, 2002 at 23:14 UTC ( #163939=note: print w/replies, xml ) Need Help??


in reply to Ranking people by weight and height

@height = (10,20,30,31,32,33); @weight = (19,18,17,16,15,14); for( (map{$_->[1]} sort{$b->[0] <=> $a->[0]} map{[$height[$_]*$weight[$_],$_]} (0..$#height))[0,1] ){ print "$_:$height[$_],$weight[$_]\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://163939]
help
Chatterbox?
[Corion]: A good daypart

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2017-04-25 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (449 votes). Check out past polls.