Daily challenge for 2026-08-08
585. Min Cost Path with Double Jumps
You are given an array of integers costs representing the cost of stepping on each index. You start at index 0. From any index i, you can jump to index i + 1 or index i + 2. The cost of stepping on an index is added to your total cost. Return the minimum cost to reach the last index of the array.
Example:
Input: costs = [10, 15, 20]
Output: 30
Explanation: You start at index 0 (cost 10), then jump to index 2 (cost 20). Total cost is 10 + 20 = 30.
Run this challenge interactively in Python or JavaScript when the app loads.