Skip to content

Files

Latest commit

6a61414 · May 29, 2019

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 29, 2019
May 29, 2019

A builder is looking to build a row of N houses that can be of K different colors. He has a goal of minimizing cost while ensuring that no two neighboring houses are of the same color.

Given an N by K matrix where the nth row and kth column represents the cost to build the nthhouse with kth color, return the minimum cost which achieves this goal.