Find the Maximum Length of Valid Subsequence I | Leetcode 3201