Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2770. Maximum Number of Jumps to Reach the Last Index
Given nums and target, you may jump from i to any j>i if nums[j]-nums[i] lies in [-target, target]; compute the maximum number of jumps to reach index n-1 (or -1 if unreachable). This is the longest-path problem on an index-ordered DAG (edges only go to higher indices), solvable with DP given n ≤ 1000.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.