Longest Increasing Subsequence (LIS)
Updated Apr 28, 2026
Short answer
Finding the length of the longest subsequence in an array where elements are sorted.
Deep explanation
Mid-level DP involves identifying the transition recurrence and the dimensions of the DP table. Finding the length of the longest subsequence in an array where elements are sorted.
Real-world example
Optimizing cargo loading on a ship with weight limits.
Common mistakes
- Confusing 0/1 Knapsack (cannot split items) with Fractional Knapsack (Greedy).
Follow-up questions
- How can you optimize space in 0/1 Knapsack?