Consider that number of boxes of dimension (x1, y1) is unknown is there a way to use this algorithm to calculate the max number of boxes of single/multi-dimensions that this algorithm can optimize: e.g.
box1 = {'length': 5, 'width: 3'} # n boxes
box2 = {'length': 4, 'width: 2'} # m boxes
...
thanks in advance.