Longest Increasing Subsequence

Medium · Dynamic Programming · about 25 minutes

Asked at Microsoft, Google, Airbnb.

Choose values from nums, keeping them in their original order, so that each chosen value is strictly bigger than the previous one. How many values can you choose at most? Target O(n log n).

Related guides