Cut rectangle in minimum number of squares

前端 未结 6 1465
-上瘾入骨i
-上瘾入骨i 2020-12-28 17:29

I\'m trying to solve the following problem:

A rectangular paper sheet of M*N is to be cut down into squares such that:

  1. The paper i
6条回答
  •  不知归路
    2020-12-28 18:07

    This is essentially classic integer or 0-1 knapsack problem that can be solved using greedy or dynamic programming approach. You may refer to: Solving the Integer Knapsack

提交回复
热议问题