Search
⌘K

Leetcode 1473. Paint House III

Given m houses (some already painted and cannot be repainted) and n colors with painting costs, paint the remaining houses to produce exactly target contiguous color groups (neighborhoods) while minimizing total cost — a dynamic-programming state-space problem over position, chosen color, and neighborhood count (return -1 if impossible).

Asked at:

LinkedIn

LinkedIn


Question Timeline

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

Late August, 2025

LinkedIn

LinkedIn

Senior

Comments

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