NeetCode #761LC-265Hard2-D Dynamic ProgrammingNC Algo100
← Back to All Problems

#761 · #265 · Paint House II(粉刷房子 II)

📌 Problem Statement & Constraints

There are n houses in a row and k colours. Painting house i with colour j costs costs[i][j], and no two adjacent houses may share a colour. Return the minimum total cost. Constraints: 1 <= n <= 100, 1 <= k <= 20, 1 <= costs[i][j] <= 20.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!