Given an integer array `nums`, return the length of the longest strictly increasing subsequence. A subsequence is a sequence that can be derived from an array by deleting some or no elements without changing the order of the remaining elements.
Dynamic Programming
We can define `dp[i]` as the length of the longest increasing subsequence that ends with the element at index `i`. To calculate `dp[i]`, we look at all previous indices $j < i$ where $nums[j] < nums[i]$ and take the maximum `dp[j] + 1`.