Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Puzzle: need a more general algorithm

by ferrency (Deacon)
on Jul 08, 2002 at 20:33 UTC ( #180313=note: print w/ replies, xml ) Need Help??


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

This is true if your categories all have equal heights. But an optimal solution for a wide height distribution might place, for example, three categories in one column, and one category in each of the other three columns. A sample dataset for which that would be the optimal solution:

my @heights = (4, 4, 4, 1, 1, 1); # in 4 columns
Alan


Comment on Re: Puzzle: need a more general algorithm
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2015-07-08 07:41 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 (96 votes), past polls