Overview - Longest Increasing Subsequence
What is it?
The Longest Increasing Subsequence (LIS) is a sequence of numbers from a given list where each number is bigger than the one before it, and the sequence is as long as possible. It does not have to be made of consecutive numbers from the list, but the order must stay the same. For example, in the list [3, 10, 2, 1, 20], the LIS is [3, 10, 20]. It helps us find patterns and order in data.
Why it matters
Without LIS, we would struggle to find the longest pattern of growth or improvement in data, which is important in many areas like stock prices, biology, or scheduling tasks. It helps us understand trends and make decisions based on the longest possible increasing pattern. Without it, we might miss important insights or make poor choices.
Where it fits
Before learning LIS, you should understand arrays and basic loops. After LIS, you can learn about dynamic programming and more complex sequence problems like Longest Common Subsequence or Patience Sorting.
