Company: Publicis Sapient_22oct
Difficulty: medium
Longest Strictly Increasing Subsequence Problem Description A subsequence is created by deleting zero or more elements from a sequence while maintaining order. A sequence is strictly increasing if every element is greater than the previous element. Determine the length of the longest strictly increasing subsequence in a sequence of integers. For example, given arr = [1, 2, 2, 3, 1, 6] , some strictly increasing subsequences are: [1, 2, 3] [1, 3, 6] The longest increasing subsequence is [1, 2, 3, 6] with a length of 4. Complete the function findLIS in the editor with the following parameter(s): int arr[n] : an array of integers Returns: int : the length of the longest strictly increasing subsequence in the array Examples Example 1: Input: arr[] Size = 3 arr[] = [1, 4, 3] Output: 2 Explanation: The longest increasing subsequences are [1,4] and [1,3] , both with length 2. Example 2: Input: arr[] Size = 5 arr[] = [1, 4, 5, 2, 6] Output: 4 Explanation: The longest increasing subsequence is