Given an integer array `volumes` and an integer `k`, partition the array into `k` non-empty contiguous subarrays. The score of each partition is the sum of its elements. Your goal is to minimize the maximum score among all `k` subarrays. Return the minimum possible maximum subarray sum after partitioning.
Explanation: We can partition the array into [7, 2, 5] and [10, 8]. The sums of these subarrays are 14 and 18 respectively. The maximum of these is 18, which is the minimum possible.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak