bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Medium1-D Dynamic ProgrammingLC 300

Longest Increasing Subsequence

Given an integer array nums, return the length of the longest strictly increasing subsequence.

Asked at 12 companies
AdobeAmazonApple
Hints
  • 1.Think about what data structure fits Longest Increasing Subsequence
  • 2.Consider the brute force complexity and how to optimize
  • 3.Can you trade space for time?
LeetCodeNeetCode