{%hackmd theme-dark %}
# 300. (LIS)Longest Increasing Subsequence
###### tags: `fundamental`
## ChungYi
* ## Solution 1 Recursive + Memorization =DP O(n^2)
* ### Explanation
F([1..n]) = Max{ lengthOfLISEndOfTail(i) for i= 1..n}
lengthOfLISEndOfTail(i) = max( lengthOfLISEndOfTail( j ) for j= 1..i if nums[i] > nums[j] else 0, 1)
DP for lengthOfLISEndOfTail(i)
* ### performance o(n^2)
* Complexity: o(n^2)
* Performance
* time: 65%
* memeory 3