Paint house: cheapest daily colors with no repeat on consecutive days
For the next n days a store sells blue, green and red shirts, and you get three cost arrays, one per color, giving each color's price on each day. You buy exactly one shirt every day, but you may not buy the same color on two consecutive days. Return the minimum total cost.
This is the classic "paint house" problem: explain the recurrence, then bring the extra space down to a constant.
No answer yet. Write the first one; the best answer gets endorsed.
