Number of Longest Increasing Subsequences
DP on LIS DSA practice problem on Onlearn.
Difficulty: hard.
Topics: Number of Longest Increasing Subsequences (LIS) in an Array, Dynamic Programming, Longest Increasing Subsequence, Arrays, Subsequences, Time Complexity, Space Complexity, Loops, Tabulation, Optimal Substructure, Overlapping Subproblems, combinatorics, general programming, dynamic programming, Subset & Permutation Problems.
Number of Longest Increasing Subsequences Problem Statement Given an integer array nums, return the number of longest increasing subsequences. An increasing subsequence is a subsequence where each element is strictly greater than the preceding element. A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements. Input Specification The input will consist of a single line containing space separated integers representing the array nums. Output Specification Return an integer representing the count of the longest increasing subsequences. Sample Test Case Input: 1 5 4 3 2 6 7 2 Output: 4