Split Array Largest Sum
hard
1. Given an array nums which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. 2. Write an algorithm to minimize the largest sum among these m subarrays.
Constraints
1 <= nums.length <= 1000 0 <= nums[i] <= 10^6 1 <= m <= nums.length
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
5
7 2 5 10 8
2
Sample Output
18