Problem is to find LIS(Longest Increasing Subsequence) of any given array. Ex. a[]={10,9,7,8,9}; length=3; {7,8,9}
So one way of doing in nlogn is
- Sort the array
- Take LCS of the the two Resulting is LIS.
Now I understood how to do it. But how do I prove it is correct. How to apply MI here?