Split Array Largest Sum(二分,dp?)
1 ≤ n ≤ 1000
1 ≤ m ≤ min(50, n)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 into [7,2,5] and [10,8],
where the largest sum among the two subarrays is only 18.PreviousConvert Binary Search Tree to Sorted Doubly Linked List (Tree)NextSum of Left Leaves(递归和分治,dfs,树)
Last updated