Longest Increasing Subsequence
nums = [50, 3, 10, 7, 40, 80]
4
The longest increasing subsequence is [3, 7, 40, 80] which has length 4.
nums = [1, 2, 4, 3]
3
Both [1, 2, 4] and [1, 2, 3] are longest increasing subsequences which have length 3.