Concept Flow - Longest Increasing Subsequence
Start with array
Initialize LIS array with 1s
For each element i
Check all elements j < i
If arr[j
Update LIS[i
Repeat for all i
Find max value in LIS array
Result: length of longest increasing subsequence
We start with the array, build an LIS array storing longest subsequence lengths ending at each index, update it by checking previous elements, and finally find the maximum LIS value.
