How many rectangles of different sizes can fit in a large rectangle, until you need to exchange the large rectangle for a bigger rectangle

296 Views Asked by At

I'm trying to figure out how to plan something without actually going out and buying the stuff. the title is pretty much the problem, but let me give an example

let's say you have 2 rectangles of Length x Width: 24cm x 62cm, and 25cm x 62cm and you want to fit it in a single rectangle. and you have two larger rectangles that have LxW of 120cm x 60cm and 150cm x 90cm. is there a way I can check whether the two smaller rectangles will fit in the smaller of the two large rectangles before going with the larger of the two large rectangles?