Given an array cost where cost[i] is the cost of stepping on stair i, you may start at stair 0 or 1 and climb one or two stairs at a time. Return the minimum cost to reach the top (just past the last stair). The input is JSON {cost}.
Input: JSON {cost}.
Output: Integer — the minimum cost to reach the top.
Input: {"cost":[10,15,20]}
Output: 15
Explanation: Start at index 1 and step to the top.Input: {"cost":[1,100,1,1,1,100,1,1,100,1]}
Output: 6
Explanation: Skip the expensive stairs.Input: {"cost":[0,0]}
Output: 0
Explanation: No cost.2<=n<=1000