Array
3201. Find the Maximum Length of Valid Subsequence I
Given an array nums. A subsequence of length m is valid if the parity of each adjacent pair's sum is the same: (sub[0]+sub[1])%2 == (sub[1]+sub[2])%2 == …. Find the length of the longest valid…
Loading…