Skip to content

Tag Archives: subsequence

Given an integer K and an array arr[], the task is to find the number of subsequences from the given array such that each subsequence… Read More
Given an array arr[] and an integer K, the task is to find number of non empty subsequence of length K from the given array… Read More
Given a positive integer array arr[] of size N, the task is to find the maximum sum of a subsequence with the constraint that no… Read More
Given an array arr[] of size N, the task is to find the longest increasing sub-sequence such that index of any element is divisible by… Read More
Given an array arr[] of size N, the task is to find the largest subarray which consists of all equal elements.Examples:   Input: arr[] = {1,… Read More
Given an array arr[] of N distinct integers and a positive integer M, the task is to find the product of all the elements at… Read More
Given an array arr[] containing non-negative integers of length N, the task is to print the length of the longest subsequence of the Perfect number… Read More
Given an array arr[] containing non-negative integers of length N, the task is to print the length of the longest subsequence of Powerful numbers in… Read More
Given string str. The task is to find the longest subsequence of str such that all the characters adjacent to each other in the subsequence… Read More
Given a string containing only english alphabets, the task is to print the longest subsequence containing only consonants.Examples:   Input : str = “geeksforgeeks” Output : gksfrgks The… Read More
Given an array of integers arr[], the task is to maximize the product of the digit sum of every consecutive pair in a subsequence of… Read More
Given string str with uppercase characters and an integer K, the task is to find the length of the longest subsequence such that the frequency… Read More
Given an integer array nums and an integer K, The task is to find the maximum sum of a non-empty subsequence of the array such… Read More
Given an array arr[] of N integers, the task is to choose the two subsequences of equal lengths such that the first subsequence must have… Read More
Given an array arr[] containing N integers, the task is to print the length of the longest subsequence of even numbers in the array. Examples:  … Read More

Start Your Coding Journey Now!