Available question text
Find the longest subsequence of nums that has at most k adjacent changes (i.e., at most k indices i with seq[i] != seq[i+1], equivalently at most k+1 constant runs). The core challenge is maximizing picks under a small transition budget (k ≤ 50), typically solved with dynamic programming over transition count and last chosen value or run.
Related questions
Continue with questions that share topics or the same question type.
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
No company association
Leetcode 3177. Find the Maximum Length of a Good Subsequence II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source