box stacking problem

懵懂的女人 提交于 2019-12-21 05:38:06

问题


Given are n boxes in three dimension (h, w, d). The goal is to stack them on top of each other to have a maximum height (boxes can be rotated). Each box that you put on top should have a smaller dimension (w, d) than the one below.

How can we do it with dynamic programming and greedy?


回答1:


This is the box stacking problem - problem 4 there.

If you want to think about it yourself, think about how you can adapt the longest increasing subsequence algorithm for solving this.



来源:https://stackoverflow.com/questions/4511086/box-stacking-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!