I have a rectangle with 200 width and 100 height. I have a mix pool of 50 rectangles and boxes. The rectangles comes in shapes like 20x40, and 40x20. The boxes will come in shapes of 20x20 and 40x40. So lets say If I want to fit the highest number of boxes and rectangles in this bigger rectangle in order to leave no space. How I can achieve it other that bin packing algorithm or rectangle packing algorithm. And if I should pick one of those algorithms, is there a good implementation out there for this scenario ?
Even the simpler one-dimensional version, where you have a line segment of a certain length, and you want to pack shorter line segments into there, is a very hard problem called bin-packing. Sorry, there's no easy answer to your question.