Skip to content

Tag Archives: subsequence

Given an array arr[] of size N, the task is to find the maximum sum non-empty subsequence present in the given array. Examples: Input: arr[]… Read More
Given an array arr[] of length N consisting of positive integers, the task is to find the longest increasing subsequence that can be formed by… Read More
Given an integer N (N &e; 3), the task is to split all numbers from 1 to N into two subsequences such that the sum… Read More
Given an array arr[] consisting of N positive integers, the task is to find the length of the longest increasing subsequence possible by selecting elements… Read More
Given an array arr[] of size N, the task is to find the minimum number of array elements required to be removed from the array… Read More
Given a string str of length N, the task is to print all possible non-empty subsequences of the given string such that the subsequences either… Read More
Given an array arr[] consisting of N integers and two integer values L and R, indicating the starting and ending indices of a subarray, the… Read More
Given two positive integers N and K, the task is to print all possible K-length subsequences from first N natural numbers whose sum of elements… Read More
Given an array arr[] consisting of N integers and an array Queries[][] with each query of the form {x, y}. For each query, the task… Read More
Given an array arr[] of size N, the task is to find the longest non-empty subsequence from the given array whose sum is maximum. Examples:… Read More
Given a string str of length N, the task is to print all possible distinct subsequences of the string str which consists of non-repeating characters… Read More
Given an array arr[] consisting of N unique elements, the task is to generate an array B[] of length N such that B[i] is the… Read More
Given a binary string, str, the task is to empty the given string by minimum number of removals of a single character or a subsequence… Read More
Given a string str, consisting of lowercase alphabets, the task is to find the shortest string which is not a subsequence of the given string.… Read More
Given two arrays arr1[] and arr2[] of length M and N consisting of digits [0, 9] representing two numbers and an integer K(K ≤ M… Read More

Start Your Coding Journey Now!