Leetcode 1739. Building Boxes
Place n unit cubes into stacks on an n×n floor with the rule that a cube can be stacked only if the supporting cube's four lateral faces are each adjacent to a wall or another cube—this enforces that column heights form a 2D nonincreasing (Young diagram) layout. Compute the minimum number of floor cells (columns) that must be occupied by choosing column heights that sum to n under that monotonicity constraint.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.