Skip to content

Tag Archives: subsequence

A sequence of positive real numbers S1, S2, S3, …, SN is called a superincreasing sequence if every element of the sequence is greater than… Read More
Given two arrays S[] and T[] of size N and M respectively. The task is to find the pairs of subsequences of S[] and subsequences… Read More
Given an array arr[] of N elements and a positive integer K such that K ≤ N. The task is to find the number of… Read More
Given a sequence arr of N positive integers, the task is to find the length of the longest subsequence such that xor of adjacent integers… Read More
Given an array arr[], the task is to find the longest subsequence with a given OR value M. If there is no such sub-sequence then… Read More
Given an array arr[] and an integer M, the task is to find the longest subsequence with a given AND value M. If there is… Read More
Given an array arr[] and an integer M, the task is to find the length of the longest subsequence whose sum is divisible by M.… Read More
Given an array arr[], the task is to find the longest subsequence with a given AND value M. If there is no such sub-sequence then… Read More
Given an array arr[] of length N, the task is to find the length of the largest sub-sequence with non-negative sum.Examples:   Input: arr[] = {1,… Read More
Given an array arr[] of length N, the task is to find the length of the longest sub-sequence with the maximum possible GCD.Examples:   Input: arr[]… Read More
Given an array arr[] of length N, the task is to find the length of the longest sub-sequence with minimum possible LCM.Examples:   Input: arr[] =… Read More
Given an array arr[] of size N and an integer K, the task is to find the number of K length subsequences of this array… Read More
Given an array Arr and an integer K. The task is to find the number of subsequences of size K such that the LCM and… Read More
Given N strings containing of characters ‘a’ and ‘b’. These string can be concatenated in any order to make a single final string S. The… Read More
Given two arrays arr[] and cost[] where cost[i] is the cost associated with arr[i], the task is to find the minimum cost of choosing three… Read More

Start Your Coding Journey Now!