Solve 2-3_longest-increasing-subsequence using a O(n^2) algorithm.