Leetcode 3409. Longest Subsequence With Decreasing Adjacent Difference
Find the longest subsequence of nums such that the absolute differences between consecutive chosen elements are non-increasing. This is an LIS-like DP problem where you must track states by last element (or index) and the previous absolute difference — n ≤ 10^4 and values ≤ 300 (so differences are bounded) which guides feasible DP/optimization approaches.
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.