I need an algorithm that tries to pack as many rectangles, of random width and height, as possible into one large rectangle. The many rectangles cannot be rotated and already have a fixed y-coordinate in the large rectangle. The large rectangle has a fixed size and cannot be rotated either.
Does anyone know of an algorithm that does the above? Or an algorithm that could be modified to do what is described above?