Given two arrays A[] and B[] consisting of strings, the task is to print the strings from array A[] having all strings in B[] as… Read More

# Tag Archives: subsequence

Given an array arr[] of size N, consisting of positive and negative integers, the task is to find the longest alternating subsequence(i.e. the sign of… Read More

Given an array arr[] of N positive integers, the task is to find the length of the longest subsequence such that Bitwise XOR of all… Read More

Given an array arr[] of N positive integers, the task is to find the largest strictly increasing subsequence of arr[] such that the indices of… Read More

Given an array arr[] of N positive integers, the task is to print the length of the longest subsequence of the array such that all… Read More

Given a string str and an integer K, the task is to find a string S such that it has exactly K subsequences of given… Read More

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

Given two array of N integers arr[] and costArray[], representing removal cost associated with each element. The task is to find the subsequence from the… Read More

Given an integer array arr[] of size N and an integer K. The task is to find length of longest subsequence whose sum is less… Read More

Given an array arr[] of N positive integers and a number K, the task is to find the maximum value of bitwise OR of the… Read More

Given an array arr[] of size N, the task is to find the minimum possible sum by extracting the smallest element from any K subsequences… Read More

Given an array arr[] consisting of N integers and an integer K, the task is to find the length of the longest subsequence with a… Read More

Given N lists of strings, the task is to find the count of lists which are not a sublist of any other given lists. Examples:… Read More

Given a large number in form of string str of size N, the task is to count the subsequence of length 4 whose digit are… Read More

Given a string str of lowercase English alphabets, our task is to find the frequency of occurrence a subsequence of the string which occurs the… Read More