Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Puzzle: need a more general algorithm

by Abigail-II (Bishop)
on Jul 09, 2002 at 16:48 UTC ( #180541=note: print w/replies, xml ) Need Help??

in reply to Re(2): Puzzle: need a more general algorithm
in thread Puzzle: need a more general algorithm

Actually, once you know the height that will work, a simple greedy algorithm will do (stuff as much as you can in the first column, then the next, and the next, etc). After all, it was given that any solution would do, not the prettiest or something like that.


  • Comment on Re: Puzzle: need a more general algorithm

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://180541]
[Corion]: Oooh - I had another devious idea - "Host C" - a C language where every struct is 4K in size. This makes memory and disk access incredibly fast ;)
[Corion]: (because everything is aligned to a memory page and all pages can be read+written directly from disk without buffering)

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2017-04-25 08:55 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (449 votes). Check out past polls.