previous_row and current_row of size 3 to store the minimum costs for each color up to the current house.previous_row to the costs of painting the last house with each color.current_row with the new costs.previous_row to current_row.previous_row.