Given an integer array nums and a positive integer k.
A subsequence sub of nums with length k is equal. That is:
Return the maximum length of a valid subsequence of nums.
Note: A subsequence is derived from an array by deleting zero or more elements without changing the order of the remaining elements.
Constraints:
nums.length
nums[i]
k
Given an integer array nums and a positive integer k.
A subsequence sub of nums with length k is equal. That is:
Return the maximum length of a valid subsequence of nums.
Note: A subsequence is derived from an array by deleting zero or more elements without changing the order of the remaining elements.
Constraints:
nums.length
nums[i]
k