From: Phrogz Date: 2005-06-30T06:05:42+09:00 Subject: Re: Programmers Contest: Fit pictures on a page Karl, I think you are (incorrectly) assuming that all the pictures have the same size or aspect ratio. It's a bin-packing problem. Given a fixed-size space and differing-sized objects, the ways in which they are placed very much affect the amount of leftover space.