Box stacking problem with vari | CareerCup
With 3 dimensions it should not be a problem. Expanding this to K dimensions. You would work on all of those for the constraint, but for the height you would need to know which one is the height.You need to consider that someone could turn the box and therefore change the height. In that case, you would need to expand the search so you can use any dimension as height. If so, you could always place the height on the same location inside the Box object.
So, you could for each box, turn and see if this new box can create the max stack... You could come up with a method that given a box, it will output a list of "new boxes" which are the turns for the first one. All those new boxes would be part of the box list and then you would use the same algorithm with the caveat of making sure that you are not putting the same box on top of itself and having the height always in the same place.
Read full article from Box stacking problem with vari | CareerCup
No comments:
Post a Comment