Concept Flow - Longest Increasing Subsequence
Start with empty LIS array
For each element in input array
Find position in LIS to place element
If element > all in LIS, append
Else replace element at found position
Repeat for all elements
Length of LIS array = length of longest increasing subsequence
We build a list representing the smallest possible last elements of increasing subsequences of different lengths, updating it as we scan the input.
