YUNOVA · Data Structures & Algorithms · Module 11: Advanced dynamic programming

Longest increasing subsequence

Notes for offline study · 30 November 2026

Longest increasing subsequence

Key points

  • The O(n²) LIS uses dp[i] = longest increasing subsequence ending at i.
  • Patience sorting with binary search finds LIS length in O(n log n).
  • A subsequence keeps the original order but need not be contiguous.

Free on YUNOVA · yunova.in · Sign in to add your own lesson notes to this sheet.