Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1340. Jump Game V
Given an array and max distance d, you may jump from i to j (|i-j|<=d) only if arr[j] < arr[i] and every element between i and j is also < arr[i]; find the maximum number of indices you can visit starting from any index. This is equivalent to finding the longest path in the DAG of valid strictly-decreasing jumps and is typically solved with DP/DFS + memoization (or monotonic-stack ordering).
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.