I need to solve a 2d bin packing problem using best fit on line in Java. I don't know how exactly should I find the correct location to put the next box.
I was thinking. Should I store all the top box positions of each 2d bin somewhere? Should I keep something like an array and a 2d array in each bin with how empty they are in an array and the position of each top box in the 2d array?