Description
Given an array arr, containing price of 'N' cookies, which are to be
distributed to 'k'children by splitting the array into 'k continuous
subarrays (containing at least 1 cookie). You have to divide the array in
such a way, that the largest sum of prices among these 'k' subarrays is
minimum possible. Return that minimized largest sum.
Input format -
• First line will contain the size of array, N
• Next "N" lines will contain N integers denoting array arr.
• The last line will contain integer k.
Okay
Answers
Answered by
2
Answer:
first sort the array arr[0..n-1], then find the subarray of size m with the
Similar questions