How to determine the longest increasing subsequence using dynamic programming?
OK, I will describe first the simplest solution which is O(N^2), where N is the size of the collection. There also exists a O(N log N) solution, which I will describe also. Look here for it at the section Efficient algorithms. I will assume the indices of the array are from 0 to N – … Read more