Available question text
Find the length of the longest strictly increasing subsequence of nums such that each adjacent difference is ≤ k. With n up to 1e5 and values bounded, this reduces to DP where dp[x] = 1 + max dp[y] for y in [x-k, x-1], requiring a range-maximum data structure (segment tree / Fenwick) for efficiency.
Related questions
Continue with questions that share topics or the same question type.
- Longest Continuous Increasing Subsequence
Coding
- Longest Increasing Subsequence
Coding · Array · Binary Search · Dynamic Programming
- Number of Longest Increasing Subsequence
Coding
- Increasing Triplet Subsequence
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
Google
Leetcode 2407. Longest Increasing Subsequence II
Reported Aug 1, 2026 · 2 source reports
MID_LEVEL
Source snapshot: Nov 12, 2026
View source