Search
⌘K

Leetcode 3429. Paint House IV

Given an even-length row of n houses and a cost matrix for 3 colors, find the minimum total painting cost such that no two adjacent houses share a color and no pair of houses equidistant from the ends share a color. This is a constrained DP problem that enforces both local adjacency and mirrored (palindromic) constraints across the row.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.