746 Min Cost Climbing Stairs
1. Question
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].2. Implementation
3. Time & Space Complexity
Last updated