Ezvor

1231. Divide Chocolate

HardArray Preparing judge… LeetCode
ArrayBinary Search

Hints

Hint 1
After dividing the array into K+1 sub-arrays, you will pick the sub-array with the minimum sum.
Hint 2
Divide the sub-array into K+1 sub-arrays such that the minimum sub-array sum is as maximum as possible.
Hint 3
Use binary search with greedy check.