Skip to content

Tag Archives: subsequence

Given array A[] formed by the concatenation of string “ABC” one or multiple times. The task for this problem is to remove all occurrences of… Read More
Given a linked list of integers, the task is to determine if there exists a subsequence of prime numbers whose sum is a perfect square.… Read More
Given an array of integers arr[] and an integer k, we need to find the maximum sum of a subsequence such that the index difference… Read More
Given an array A[] consisting of n elements and integer K. The task is to find the maximum length of the subsequence of array A[],… Read More
Given an array arr[] consisting of N unique elements, the task is to return the count of the subsequences in an array in which the… Read More
A subsequence is defined as a sequence that can be derived from another string/sequence by deleting some or none of the elements without changing the… Read More
Given a string S of characters R, L, U, D, along with integers X1, Y1, X2, Y2. In String S, ‘R’, ‘L’, ‘U’, and’D’ denote… Read More
Given an array A[] with size N, Select a subsequence B = {B[1], B[2], B[3], ………B[N] } of size M from given array A[]  (N… Read More
Given a binary string S consisting of ‘0‘ and ‘1‘ only, the task is to find the maximum possible number of “10” subsequences by replacing… Read More
Given an array arr[] of size N and a non-negative integer K, the task is to find the length of the longest subsequence such that… Read More
Given an array arr[] of positive numbers, the task is to find the minimum sum of a subsequence of maximum possible elements with the constraint… Read More
Given an array of positive integers arr[] of length N and a query array query[] of length M, the task is to find the maximum… Read More
Given an array A[] of size N, the task is to maximize the frequency of any element by adding any positive integer X to all… Read More
Given an array of size N and two integers M and K., All the integers in the array are in the range [1, M]. Find… Read More
Given an integer array A[] of size N, the task is to check if the array can be divided into two subsequences such that appending… Read More