Skip to content

Tag Archives: subsequence

Given an array arr[] of N integers and a positive integer K, the task is to check if it is possible to divide the array… Read More
Given an array arr, the task is to find the maximum sum of subsequence after flipping signs of at most K elements. Examples: Input: arr… Read More
Given an array arr[] of N integers, the task is to find the number of subsequences of the given array such that their Bitwise AND… Read More
Given a string S of size N consisting of digits [1, 9], the task is to find the length of the smallest subsequence in the… Read More
Given an integer K and an array arr[] having N pairwise distinct integers in the range [1, K], the task is to find the lexicographically… Read More
Given a string S consisting of N digits, the task is to partition the string into at most two increasing subsequences such that concatenation of… Read More
Given a string S, the task is to find the lexicographically largest subsequence that can be formed using all distinct characters only once from the… Read More
Given a string S consisting of N characters, the task is to find the minimum number of characters that must be added to S such… Read More
Given an array arr[] consisting of N positive integers, the task is to find the number of subsequences of length 4 having product of the… Read More
Given a string S consisting of N characters and a positive integer K, the task is to find the minimum number of operations required to… Read More
Given a string str containing characters ‘G’ and ‘F’ only, the task is to check if the given string str can be made empty after… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum value of K such that for every integer i over… Read More
Given an array arr[] consisting of N positive integers and a positive integer K, the task is to find the minimum number of elements that… Read More
Given an array arr[] consisting of N positive integers, the task is to check if the product of elements of every subsequence of the given… Read More
Given a string S consisting of N lowercase English alphabets, and an integer K and, an array cost[] of size 26 denoting the cost of… Read More

Start Your Coding Journey Now!