Dark Mode
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Note: If n is the length of array, assume the following constraints are satisfied:
1 <= n <= 1000 1 <= m <= min(50, n) Examples:
Input: nums = [7,2,5,10,8] m = 2
Output: 18
Explanation: There are four ways to split nums into two subarrays. The best way is to split it
Solution O(n ^ 2 * k) Build a bottom up min-max dp table for each sub-array ranging from n ->