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.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.