Given is an array Arr of integers. The task is to determine if the array has any subsequence of at least length 3 that is… Read More

# Tag Archives: subsequence

We are given an array arr of n element. We need to count number of non-empty subsequences such that these individual subsequences have same values… Read More

Given an array arr[] of size n having both positive and negative integer excluding zero. The task is to find the subsequence with an alternating… Read More

Given an array arr[] of size n having both positive and negative integer excluding zero. Find the maximum sum of maximum size alternate subsequence of… Read More

Given an array arr[] containing N elements that contain both positive and negative elements, the task is to find the total number of contiguous subsequences… Read More

Given an array arr[] and a number K which is present in the array at least once, the task is to find the number of… Read More

Given a string of size N and some queries, the task is to find the lexicographically smallest palindromic subsequence of even length in range [L,… Read More

Given an array arr[] of length N and a number K, the task is to find all the subsequences of the array whose sum of… Read More

Given an array arr containing non-negative integers, the task is to print the length of the longest subsequence of Fibonacci numbers in this array.Examples: Input:… Read More

Given an array arr containing non-negative integers, the task is to print the length of the longest subsequence of prime numbers in the array.Examples: Input:… Read More

Given a string str containing only alphabets, the task is to print the longest subsequence of the string str containing only vowels.Examples: Input: str =… Read More

Given an array arr[] of positive integers of size N, the task is to find the maximum product of bitonic subsequence of size 3.Bitonic Subsequence:… Read More

Given a string, we have to find out all subsequences of it. A String is a subsequence of a given String, that is generated by… Read More

Given an array arr[] of size N, the task is to find the length of the longest increasing subsequence in the array formed by the… Read More