## 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 »

## Lexicographically largest sub-sequence of the given string

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 »

## Find the lexicographically largest palindromic Subsequence of a String

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

## Count number of sub-sequences with GCD 1

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 »

## Count all sub-sequences having product <= K – Recursive approach

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 »

## Print all subsequences of a string using ArrayList

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 »

## Maximum number of removals of given subsequence from a string

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 »

## Longest Subsequence where index of next element is arr[arr[i] + i]

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 »

## Longest Ordered Subsequence of Vowels

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 »

## Number of ways to partition a string into two balanced subsequences

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 »

## Sum of width (max and min diff) of all Subsequences

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 »

## Check if there exists any sub-sequence in a string which is not palindrome

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 »

## Longest Subsequence with at least one common digit in every element

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 »

## Subset array sum by generating all the subsets

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 »

## Number of balanced bracket subsequence of length 2 and 4

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 »