Class Solution
java.lang.Object
g0601_0700.s0673_number_of_longest_increasing_subsequence.Solution
673 - Number of Longest Increasing Subsequence.<p>Medium</p>
<p>Given an integer array <code>nums</code>, return <em>the number of longest increasing subsequences.</em></p>
<p><strong>Notice</strong> that the sequence has to be <strong>strictly</strong> increasing.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> nums = [1,3,5,4,7]</p>
<p><strong>Output:</strong> 2</p>
<p><strong>Explanation:</strong> The two longest increasing subsequences are [1, 3, 4, 7] and [1, 3, 5, 7].</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> nums = [2,2,2,2,2]</p>
<p><strong>Output:</strong> 5</p>
<p><strong>Explanation:</strong> The length of longest continuous increasing subsequence is 1, and there are 5 subsequences’ length is 1, so output 5.</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= nums.length <= 2000</code></li>
<li><code>-10<sup>6</sup> <= nums[i] <= 10<sup>6</sup></code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
findNumberOfLIS
public int findNumberOfLIS(int[] nums)
-