Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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"; }


Comment on Re: Algorithm concerns
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2014-12-22 02:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (110 votes), past polls