Interview Question
Country: United States
i can think of the below; let me kow if u see issues
1. Let the paper size is m x n
2. Small paper piece dimention: sm x sn
3. compute: pieces = modulus( m/sm ) * modulus( n/sn )
4. compute: pieces2 = modulus( m/sn ) * modulus( n/sm )
5. return max ( pieces2, pieces)
It is more like 0-1 knapsack problem.
- s October 17, 2014We need to maximize filled space and minimize empty space.