Find the Maximum Length of Valid Subsequence II | Leetcode 3202