#3826
Minimum Partition Score
master · 1880 · lc hard +32 · 34% accepted · 45 likes · top 11%
Description
Given an integer array nums and an integer k, split nums into exactly k contiguous subarrays to minimize the total score. The score of a partition is the sum of the values of all subarrays, where the value of a subarray with element sum sumArr is sumArr * (sumArr + 1) / 2. Return the minimum achievable score.
Code
1
2
3