You are given an integer array `cost` where `cost[i]` is the cost of the `i`-th step on a staircase. Once you pay the cost, you can climb either **one or two steps**.
You can either start from the step with index `0`, or the step with index `1`.
Return the minimum cost to reach the **top of the floor** (one past the last index).
Example 1
Input:cost = [10,15,20]
Output:15
Explanation:Start at index 1, pay 15, climb two steps to the top.
Example 2
Input:cost = [1,100,1,1,1,100,1,1,100,1]
Output:6
Explanation:Start at index 0 and repeatedly skip the expensive 100-cost steps: pay 1 six times.