Algorithm · Pinduoduo · Hard
You are given an integer array nums. Return the number of distinct subsequences of nums that are strictly increasing and have the maximum length among all increasing subsequences. A subsequence is a sequence that can be derived from the array by deleting some (or no) elements without changing the order of the remaining elements. Example 1: Explanation: The two longest increasing subsequences are [1,3,5,7] and [1,3,4,7]. Example 2: Explanation: The array contains no…