Minimize the total painting cost with no two adjacent houses sharing a color.
Constraints
Example
>>> paint([]) 0 >>> paint([[1,2,3],[1,2,3]]) 3 >>> paint([[5,10,20],[10,20,30],[20,30,40]]) 45
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints