Tap here to switch tabs
Problem
Submissions

Problem: Climbing Stairs II

Try to solve the Climbing Stairs II problem.

Statement

You are given an integer n and a 00 indexed integer array costs of length n, where costs[i - 1] represents the cost of landing on step i.

You start at step 00 and want to reach step n. From any step i, you can jump forward to any step j such that i<j≤i < j \le n. The cost of making a jump from step i to step j is:

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Climbing Stairs II

Try to solve the Climbing Stairs II problem.

Statement

You are given an integer n and a 00 indexed integer array costs of length n, where costs[i - 1] represents the cost of landing on step i.

You start at step 00 and want to reach step n. From any step i, you can jump forward to any step j such that i<j≤i < j \le n. The cost of making a jump from step i to step j is: