## Maximum sum possible for a sub-sequence such that no two elements appear at a distance < K in the array

Given an array arr[] of n integers and an integer k, the task is to find the maximum sum possible for a sub-sequence such that… Read More »

- Subset array sum by generating all the subsets
- Longest subsequence such that adjacent elements have at least one common digit
- Count common subsequence in two strings
- Number of ways to partition a string into two balanced subsequences
- Generating all possible Subsequences using Recursion
- Print all subsequences of a string using ArrayList
- Longest Ordered Subsequence of Vowels
- Sum of minimum element of all sub-sequences of a sorted array
- Find the lexicographically largest palindromic Subsequence of a String
- Number of balanced bracket subsequence of length 2 and 4
- 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
- Longest Subsequence where index of next element is arr[arr[i] + i]
- Check if there exists any sub-sequence in a string which is not palindrome
- Sum of width (max and min diff) of all Subsequences
- Maximum number of removals of given subsequence from a string
- Count all sub-sequences having product <= K - Recursive approach
- Longest subsequence having greater corner values
- Minimal product subsequence where adjacent elements are separated by a maximum distance of K
- Minimum cost to make a string free of a subsequence

Given an array arr[] of n integers and an integer k, the task is to find the maximum sum possible for a sub-sequence such that… Read More »

Given an array arr[] and an integer K, the task is to find out the minimum product of a subsequence where adjacent elements of the… Read More »

Given a string str consisting of lowercase English alphabets and an array of positive integer arr[] both of same length. The task is to remove… Read More »

Given an array arr[] of N integers, the task is to find the length of the longest sub-sequence such that adjacent elements of the sub-sequence… Read More »

Given a sorted array A of n integers. The task is to find the sum of minimum of all possible subsequences of A. Note: Considering… Read More »

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 »