Subj : Re: stacking algorithm To : comp.programming From : Jon Harrop Date : Thu Aug 04 2005 02:12 pm Omri Barel wrote: > The result is not necessarily minimal. You insert the line segment into > the first line it can fit in (and on top otherwise). Yes, exactly. The solutions produced by my code will be at least as good as those by the code the OP described and will be produced more quickly than an exhaustive search. I don't know if this problem can be solved optimally more quickly that an exhaustive search. -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com .