Skip to content
RED SAG Skills
easy5 pts · first answer countsdynamic-programmingdp-basics

Cheapest way up the stairs

Step i costs cost[i] to stand on. You can start at step 0 or 1 and climb 1 or 2 steps at a time; the top is past the last step. For cost = [10, 15, 20], what is the minimum total cost?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions