Longest Increasing Subsequence


@kenteng Completely agree with you!
For example, if the inputs nums is [4, 10, 4], the solution builds the following dp:
[1, 2, 1]

@danielz You don't simply compare two elements in each iteration. Think it in another way, the largest possible total number of the combination of the LIS is 2^n, and thus, the brute force takes O(2^n) to finish.