## Longest subsequence having greater corner values

Given an array arr[] containing a random permutation of first N natural numbers, the task is to find the longest sub-sequence having the property that… Read More »

- Subset array sum by generating all the subsets
- Number of ways to partition a string into two balanced subsequences
- Print all subsequences of a string using ArrayList
- Longest Ordered Subsequence of Vowels
- Find the lexicographically largest palindromic Subsequence of a String
- Longest Subsequence with at least one common digit in every element
- Count number of sub-sequences with GCD 1
- Lexicographically largest sub-sequence of the given string
- Check if there exists any sub-sequence in a string which is not palindrome
- Longest Subsequence where index of next element is arr[arr[i] + i]
- Sum of width (max and min diff) of all Subsequences
- Longest subsequence having greater corner values
- Maximum number of removals of given subsequence from a string
- Count all sub-sequences having product <= K - Recursive approach

Given an array arr[] containing a random permutation of first N natural numbers, the task is to find the longest sub-sequence having the property that… Read More »

Given a string str containing lowercase characters, the task is to find the lexicographically largest sub-sequence of str. Examples: Input: str = “abc” Output: c… Read More »

Given a string . The task is to find the lexicographically largest subsequence of the string which is a palindrome. Examples: Input : str =… Read More »

Given an array of N numbers, the task is to count the number of subsequences which have gcd equal to 1. Examples: Input: a[] =… Read More »

Given an integer K and a non negative array arr[], the task is to find the number of sub-sequences having product ≤ K. This problem… Read More »

Given a string str, the task is to print all the sub-sequences of str. A subsequence is a sequence that can be derived from another… Read More »

Given a string str, the task is to count the maximum number of possible operations that can be performed on str. An operation consists of… Read More »

Given an array arr[], the task is to find the maximum length sub-sequence from the array which satisfy the following condition: Any element can be… Read More »

Given a string consisting of only vowels, find the longest subsequence in the given string such that it consists of all five vowels and is… Read More »

Given a string ‘S’ consisting of open and closed brackets, the task is find the number of ways in which each character of ‘S’ can… Read More »

Given an array A[] of integers. The task is to return the sum of the width of all subsequences of A. For any sequence S,… Read More »

Given a string of lowercase English alphabets. The task is to check if there exists any subsequence in the string which is not a palindrome.… Read More »

Given an array. The task is to find the length of the longest subsequence in which all elements must have at least one digit in… Read More »

Given an array of size N and a sum, the task is to check whether some array elements can be added to sum to N… Read More »

Given a bracket sequence of even length. The task is to find how many ways are there to make balanced bracket subsequences from the given… Read More »