Longest Increasing SubSequence O(n^2)