Leetcode 2547. Minimum Cost to Split an Array
Split the array into contiguous subarrays to minimize the total cost where each segment costs k plus the number of elements in that segment that appear more than once (the "trimmed" length). The core challenge is optimizing partitioning when segment cost depends on internal frequencies (n ≤ 1000), typically solved with DP using precomputed subarray costs.
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.