Leetcode 1959. Minimum Total Space Wasted With K Resizing Operations
Partition the timeline into at most k+1 contiguous segments (each segment uses a fixed array size equal to its segment's maximum element) and minimize the total wasted space, defined as sum over segments of (segment_length * segment_max - segment_sum). Equivalently, choose up to k resize points to minimize the sum of per-segment wastes.
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.