Fetching data...
This may take a moment
Back
2056. Jump Game VIII
Medium
Array
Dynamic Programming
Stack
Graph
Monotonic Stack
Shortest Path
Solve on LeetCode
View Solutions
Description
Hints
Hint 1
For each index, find the indexes that you can jump to.
Hint 2
We can do this by using a monotonic stack and iterating through the array backwards.
Hint 3
Create another integer array of length n called dp where dp[i] is the minimum cost of getting to index i.
Similar Questions
Jump Game II
Medium
Jump Game
Medium
Jump Game III
Medium
Jump Game IV
Hard
Jump Game V
Hard
Jump Game VI
Medium
Jump Game VII
Medium
Jump Game VIII
Medium
Statistics
Acceptance
45.4%
Submissions
17,124
Accepted
7,770