LC: 265. Paint House II
https://leetcode.com/problems/paint-house-ii/
Input: costs = [[1,5,3],[2,9,4]]
Output: 5
Explanation:
Paint house 0 into color 0, paint house 1 into color 2. Minimum cost: 1 + 4 = 5;
Or paint house 0 into color 2, paint house 1 into color 0. Minimum cost: 3 + 2 = 5.Input: costs = [[1,3],[2,4]]
Output: 5Last updated