1231. Divide Chocolate

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

Maximize the minimum total sweetness among all pieces and return that maximum possible minimum value.

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

1231. Divide Chocolate

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