Given an array of n integers. The task is to remove or delete minimum number of elements from the array so that when the remaining… Read More »
Given an array arr[0..n-1] of positive element. The task is to print remaining elements of arr after repeated deletion of LIS (of size greater than… Read More »
Given an array of n size, the task is to find the longest subsequence such that difference between adjacents is one. Examples: Input : arr… Read More »
The Maximum Sum Increasing Subsequence problem is to find the maximum sum subsequence of a given sequence such that all elements of the subsequence are… Read More »
The longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the… Read More »
Prerequisites : LCS, LIS Given two arrays, find length of the longest common increasing subsequence [LCIS] and print one of such sequences (multiple sequences may… Read More »
Given an array of random numbers, find longest monotonically increasing subsequence (LIS) in the array.
In my previous post, I have explained about longest increasing sub-sequence (LIS) problem in detail.
We have discussed Dynamic Programming solution for Longest Increasing Subsequence problem in this post and a O(nLogn) solution in this post.
After few months of gap posting an algo. The current post is pending from long time, and many readers (e.g. here, here, here may be few more,… Read More »
Given an array of n positive integers. Write a program to find the sum of maximum sum subsequence of the given array such that the… Read More »
We have discussed Overlapping Subproblems and Optimal Substructure properties in Set 1 and Set 2 respectively.