Split Array Largest Sum

easy
1. You will be given an Integer array alongwith its length and an integer m
 2. You can split the array into m non-empty continous subarrays
 3. Find the least largest sum amongst these among these m subarrays 
 4. Input and output is handled for you
 5. It is a functional problem ,please do not modify main()

Input Format

Input is handled for you

Output Format

Output is handled for you

Constraints

1 <= length of array <= 1000
 1 <= m <= minimum of 50 and n

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
14
9 12 10 7 2 15 5 11 3 13 1 4 14 8 
3
Output
40
Previous
Find Pivot Index
Next
Allocate Minimum Number Of Pages

Related Questions