Cost array for each step. You can start at step 0 or 1. Pay cost[i] to climb from step i (then climb 1 or 2 steps). Return minimum cost to reach the top.
dp[i] = min cost to reach top from step i. You can jump 1 or 2 steps. Answer is min(dp[n-1], dp[n-2]) since you can finish from either of the last two steps.