Given an array arr[] of N integers and two numbers K and S, the task is to print all the subsquence of length K with… Read More

# Tag Archives: subsequence

Given an array A[] of size N, find the Maximum Xor Subsequence such that both A [ i ] and A [ N – i… Read More

Given an array arr[] of length N, containing values in the range [1, N], the task is to find a subsequence s1, s2, …, sk… Read More

Given an integer array arr[] of size N and an integer X, the task is to count the number of subsequences in that array such… Read More

Given an array arr[] of N integers, the task is to print the subsequence from the given array with the maximum pairwise absolute difference of… Read More

Given a non-empty string S, the task is to print the longest subsequence from the string S which contains alternating vowels and consonants. Note: If multiple… Read More

Given an array arr[] of integers, the task is to check if it is possible to obtain a subsequence of K elements from the array… Read More

Given two integer arrays a[] and b[], the task is to find the maximum possible product of the same indexed elements of two equal length… Read More

Given an array arr[], the task is to find the maximum sum of all the elements which are not a part of the longest increasing… Read More

Given a binary string s, the task is to find the length of longest subsequence that can be divided into three substrings such that the… Read More

Given a string S of lowercase letters, the task is to find the length of the longest palindromic subsequence made up of two distinct characters… Read More

Given an array arr[] consisting of integers of length N and an integer K (1 <= K <= N), the task is to find the… Read More

Given an array arr of length N and an integer K, the task is to count the number of possible subsequences of length at most… Read More

Given an array arr[], the task is to find the number of non-empty subsequences from the given array such that the product of subsequence is… Read More

Given an array arr[]and an integer K, the task is to find the sum of all K length subsequences from the given array. Example: Input:… Read More