Minimum cost to paint n blocks with 3 colors
Filed under Veritas
The question
Given n blocks and a cost matrix of size n x 3 representing the cost of painting each block with one of three colors, find the minimum total cost such that no two adjacent blocks share the same color.
No write-up yet. Related questions below have one.
Related Veritas questions
Collected from public candidate posts and coding forums. Updated Nov 2026.