Skip to content
RED SAGSkills
hard20 pts · first answer countsdynamic-programmingdp-basicsspace-optimization

Painting houses with many colours fast

You paint n houses with k colours, no two neighbours the same, at minimum cost. The simple DP is O(n × k^2). How do you get O(n × k)?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions