Minimum number of increasing subsequences
Given an array of integers of size N, you have to divide it into the minimum number of “strictly increasing subsequences” For example: let the sequence be {1, 3, 2, 4}, then the answer would be 2. In this case, the first increasing sequence would be {1, 3, 4} and the second would be {2}.
Examples:
Input : arr[] = {1 3 2 4} Output: 2 There are two increasing subsequences {1, 3, 4} and {2}
Input : arr[] = {4 3 2 1} Output : 4
Input : arr[] = {1 2 3 4} Output : 1
Input : arr[] = {1 6 2 4 3} Output : 3
Last updated