Back to DSA sheet

Longest Increasing Subsequence

MediumDynamic Programming
Open on LeetCodeAmazonGoogleMicrosoft

Return the length of the longest strictly increasing subsequence of an array.

Constraints
  • 1 <= nums.length <= 2500
  • -10^4 <= nums[i] <= 10^4
Sheets
Blind 75Grind 75NeetCode 150NeetCode 250
longest-increasing-subsequence.cpp
Loading editor
Custom input (stdin)
Output

Run your code to see its output.