Skip to content

Tag Archives: subsequence

Given a string S consisting of lowercase characters and an integer K, the task is to find the maximum length of a subsequence consisting of… Read More
Given a binary string S of size N, the task is to find the length of the longest non-increasing subsequence in the given string S.… Read More
Given a 2D array plates[][] of size N, which each row representing the length and width of a N rectangular plates, the task is to… Read More
Given a string S, the task is to check if the string target is a subsequence of string S or not, using a Stack. Examples:… Read More
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