Skip to content

Tag Archives: subsequence

Given two arrays A[] and B[], both consisting of a permutation of first N natural numbers, the task is to count the minimum number of… Read More
Given two strings A and B of lengths N and M respectively, the task is to find the length of the longest common subsequence that… Read More
Given an array A[] consisting of N integers and an integer K, the task is to count the minimum number of distinct elements present in… Read More
Given a string S, the task is to find the length of the longest increasing subsequence present in the given string. A sequence of characters… Read More
Given two strings S1, S2 of length N and M respectively, and two positive integers N1 and N2, the task is to find the maximum… Read More
Given two strings str and X of length N and M respectively, the task is to find the minimum characters required to be removed from… Read More
Given an array arr[] consisting of N natural numbers, the task is to find the length of the longest subsequence from the array which does… Read More
Given a string S consisting of lowercase English alphabets, the task is to find the length of the longest subsequence from the given string such… Read More
Given an array A[] of size N, the task is to count the number of subsequences from the given array whose Bitwise XOR value is… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to print the maximum sum possible in a subsequence satisfying… Read More
Given an array arr[] consisting of N integers, the task is to find the length of the longest non-decreasing subsequence such that the difference between… Read More
Given a binary string str of size N, the task is to find the length of the smallest subsequence such that after erasing the subsequence… Read More
Given a string S of length N, the task is to find the lexicographically smallest K-length subsequence from the string S (where K < N). … Read More
Given two strings S1 and S2 of size N and M respectively, the task is to rearrange characters in string S1 such that S2 is… Read More
Given an array arr[] of size N, the task is to print the minimum possible count of strictly increasing subsequences present in the array. Note: It… Read More