Available question text
Find the longest subsequence (order preserved) of nums such that every adjacent pair sum has the same remainder modulo k. This reduces to a DP/greedy over possible target remainders, tracking for each remainder the best subsequence length you can end with given the last element's residue.
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 3202. Find the Maximum Length of Valid Subsequence II
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source