Leetcode 3013. Divide an Array Into Subarrays With Minimum Cost II
Partition nums into k contiguous subarrays (with starts s0=0<s1<...<s_{k-1}) to minimize the sum of each subarray's first element, subject to the constraint s_{k-1}-s1 ≤ dist. The core challenge is a DP over start indices with range-limited transitions (windowed coupling between early and late starts) that requires efficient sliding-window/monotonic optimizations.
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.