1231. Divide Chocolate

Problem

Divide a chocolate bar into k+1 pieces and maximize the minimum total sweetness of any piece.

Given an integer array chocolate representing a chocolate bar (row of chocolate squares) and an integer k, you want to divide the chocolate bar into k+1 pieces by making k cuts. Each piece has a total sweetness equal to the sum of chocolate squares in that piece.

Your goal is to maximize the minimum total sweetness among all pieces. Return this maximum possible minimum value.

Examples
Input: [[1,2,3,4,5,6,7,8,9],5]
Output: 6
Hints
Related Problems

1231. Divide Chocolate

Divide a chocolate bar into k+1 pieces and maximize the minimum total sweetness of any piece.