AlgoMaster Logo

Min Cost Climbing Stairs

cost=[1, 100, 1, 1, 1, 100, 1, 1, 100, 1]
0 / 21
0123456789top1?100?1?1?1?100?1?1?100?1??dp[i] = min(dp[i-1] + cost[i-1], dp[i-2] + cost[i-2])
algomaster.io
Step:Start: find the minimum cost to reach the top of 10 stairs