Split Array Largest Sum

Split the non-negative integer array nums into exactly k non-empty contiguous subarrays. Return the minimum possible value of the largest subarray sum.

Split the non-negative integer array `nums` into exactly `k` non-empty contiguous subarrays. Return the minimum possible value of the largest subarray sum.

- `1 <= nums.length <= 20` - `0 <= nums[i] <= 100` - `1 <= k <= nums.length`

Example 1: input nums = [7,2,5,10,8], k = 2; output 18. The split [7,2,5] and [10,8] has largest sum 18, which is minimal.

Example 2: input nums = [1,2,3,4,5], k = 1; output 15. One partition contains the entire array.

Category: Binary Search. Topic: binary-search. Difficulty: Hard. Patterns: binary-search-on-answer, greedy.