Hard Problemsminimizationpartitiongrid

The painter's partition problem

Given n boards of different lengths and k painters who all paint at the same speed, where each painter must paint one contiguous, unsplit block of boards, assign the boards, in order, to minimize the time the slowest painter spends.

Note. This problem is more commonly solved with binary search on the answer; the DP formulation shown here is the derivable, table-based alternative.

Do this lesson first: coin change

The full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.