in reply to Re: Puzzle: need a more general algorithm
in thread Puzzle: need a more general algorithm
Greediness does not work in general. What if your categories have sizes 15, 15, 10, 10, 15, 15? Your solution comes out with a suboptimal answer.
In Section
Seekers of Perl Wisdom