Search
⌘K

Leetcode 2312. Selling Pieces of Wood

Given an m×n rectangle and a list of prices for specific h×w pieces (rotation not allowed), maximize total revenue by cutting the rectangle with full-width or full-height cuts. The core challenge is a 2D dynamic programming / recursive partitioning problem that considers selling a matching piece versus all possible horizontal and vertical splits.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid February, 2025

Meta

Mid-level

Comments

Your account is free and you can post anonymously if you choose.