Min Cost Climbing Stairs(sequence dp)
Input:
cost = [10, 15, 20]
Output:
15
Explanation:
Cheapest is start on cost[1], pay that cost and go to the top.Input:
cost = [1, 100, 1, 1, 1, 100, 1, 1, 100, 1]
Output:
6
Explanation:
Cheapest is start on cost[0], and only step on 1s, skipping cost[3].Last updated