HitomeRyuu / 2d-container-packing-problems

2d container-packing problem.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2d-container-packing-problems

2d container-packing problem

My friend gave me this problem.

I was coding DP algorithm these days on Leetcode so I think it was a chance to test myself.

Description:
There are one big rectangle and some small rectangles with same size. To comupute the maxium count of small rectangles that can be filed in the big one.

Reference:农健恒. 同尺寸物品装箱的动态规划算法[D]. 广西大学, 2014, 2.3-2.5.
Notes that the code in this paper only considered first two "if" which led to a logical bug. The third "if" can solve this bug.:) Warning:Time complex is O4 so the big rec can not be more than 100 times longer than the small rec.

About

2d container-packing problem.


Languages

Language:HTML 70.2%Language:Java 29.8%