Fetching algorithms...
Initialize LIS array with 1s. Every single element is an increasing subsequence of length 1.
For each element `nums[i]`, we look at all elements `nums[j]` to its right. If `nums[i] < nums[j]`, then `nums[i]` can extend the increasing subsequence starting at `j`.
We compute `LIS[i] = max(LIS[i], 1 + LIS[j])` for all valid `j`.
The final result is the maximum value in the entire `LIS` array.