Last updated 1 year ago
Was this helpful?
Find the longest increasing subsequence from an array of numbers.
Example:
A = [10,9,2,5,3,7,101,18] LIS = [2,3,7,101]
The optimal solution is a DP + binary search solution with time complexity O(NlogN) and space complexity O(N).
O(NlogN)
O(N)
: a great bidirectional extension of this problem.