Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2017-12-16 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (450 votes). Check out past polls.

    Notices?