Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Packaging Algorithm

by blogan (Monk)
on Nov 07, 2000 at 08:41 UTC ( #40310=note: print w/ replies, xml ) Need Help??


in reply to Packaging Algorithm

I'm trying to think of an algorithm, and this is what I've gotten so far:

foreach (@closefamilymember) { $gift = perfectgift $_; buy($gift); push @boughtengifts, $gift; } foreach (@boughtengifts) { $box->pack($_); } foreach (@notsoclosemember) { $gift = perfectgift $_; if (!box->pack($gift)) { $gift = giftthatwillfitinfreespace $_; $box->pack($gift); } } box->mail();


Comment on Re: Packaging Algorithm
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (15)
As of 2015-07-31 20:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls