Number of Longest Increasing Subsequences
Given an array arr[] of size N, the task is to count the number of longest increasing subsequences present in the given array. Examples: Input:… Read More »
Given an array arr[] of size N, the task is to count the number of longest increasing subsequences present in the given array. Examples: Input:… Read More »
Given two arrays arr[] and arr1[] of lengths N and M respectively, the task is to find the longest increasing subsequence of array arr[] such… Read More »
Given a string S of length N, consisting of lowercase English alphabets only, the task is to find the minimum possible length of run-length-encoding that… Read More »
Given a 2D array Blocks[][] consisting of N rows of variable length. The task is to select at most M elements with the maximum possible… Read More »
Given a positive integer N, the task is to print the last remaining element from a sequence [1, N] after repeatedly performing the following operations… Read More »
Given an integer N, the task is to find the number of ways to get the sum N by repeatedly throwing a dice. Examples: Input:… Read More »
Given an integer N, the task is to find the minimum number of operations needed to obtain the number N starting from 1. Below are… Read More »
Given an array A[] consisting of N positive integers and an integer K, the task is to find the length of the smallest subarray with… Read More »
Given two integers M and N, the task is to find the minimum cost to convert M to N by repetitive addition of even divisors… Read More »
Given an array arr[] of size N, the task is to print the longest bitonic subsequence of the given array.Note: If more than one solution… Read More »
Given three arrays arr1[], arr2[] and arr3[] of length N1, N2 and N3 respectively, the task is to find the maximum sum possible by adding… Read More »
Given an array A[], the task is to find the minimum number of operations required in which two adjacent elements are removed from the array… Read More »
Given an array arr[], consisting of N non-negative integers and an integer S, the task is to find the number of ways to obtain the… Read More »
Given an array a[] consisting of N integers, the task is to find the maximum subarray sum that can be pbtained by replacing a single… Read More »
Given an array a[] consisting of N integers, the task is to perform the following operations: Select a subsequence and for every pth element of… Read More »