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 subsequence are sorted in increasing order.
For example, length of LIS for { 3,2,6,4,5,1 } is 2 and LIS is {2,4,5}.
For example, length of LIS for { 3,2,6,4,5,1 } is 2 and LIS is {2,4,5}.