 All Problems
Number of Longest Increasing Subsequence
medium
dynamic programming
arrays
amazon
google
microsoft

Given an integer array nums, return the number of longest strictly increasing subsequences.

Example 1:

Input: 1 3 5 4 7
Output: 2

Example 2:

Input: 2 2 2 2 2
Output: 5

Input format: Space-separated integers.

Output format: Count of longest increasing subsequences.

Run to check your code against the sample cases, or submit to run every case