Skip to content

#746 - Min Cost Climbing Stairs

EasyDP - 1D
Open on LeetCode

Given an integer array cost where cost[i] is the cost of step i, you can start from step 0 or 1. Each time, climb 1 or 2 steps. Return the minimum cost to reach the top (one step past the last index).

InputOutput
cost = [10,15,20]15
cost = [1,100,1,1,1,100,1,1,100,1]6

Released under the MIT License.