Find the Maximum Length of Valid Subsequence II
Every neighbouring pair of a valid subsequence has the same sum modulo k; a table keyed by end index and remainder extends chains.
Every neighbouring pair of a valid subsequence has the same sum modulo k; a table keyed by end index and remainder extends chains.