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
Now I understood how to do it. But how do I prove it is correct. How to apply MI here?
In your case there is no need for induction, you have to show three things: