110: Minimum cost climbing stairs
Given an array of integers which represents the cost of moving from each step. Paying the cost at i-th step, you can either climb one or two steps, return the minimum cost to reach the top of the stairs
Note: you can start from
0or1step
Example 1
Input: [10, 5, 15]
Output: 5
Example 2
Input: [10, 40, 1, 50]
Output: 11