CodingReported in a candidate post, Jul 2021
Paint N blocks with K colors with adjacent restriction
Filed under DE Shaw
The question
We have N blocks to be painted using K colors such that at most only 1 pair of adjacent blocks can have the same color. Find an approach to solve this using dynamic programming.
No write-up yet. Related questions below have one.
Related DE Shaw questions
Collected from public candidate posts and coding forums. Updated Nov 2026.