Paint House

There is a row of n houses, where each house can be painted one of three colors: red, blue, or green. The cost of painting each house with a certain color is represented by an n x 3 cost matrix costs.

Return the minimum cost to paint all houses such that no two adjacent houses have the same color.

Examples
Input: [[17,2,17],[16,16,5],[14,3,19]]
Output: 10
Hints

Paint House

There is a row of `n` houses, where each house can be painted one of three colors: red, blue, or green. The cost of painting each house with a certain color is represented by an `n x 3` cost matrix `costs`.