Medium · Dynamic programming
Longest Increasing Subsequence
You are given a list of whole numbers. Return the length of the longest increasing subsequence: numbers picked in their original order, each strictly larger than the one before.
- The picked numbers need not be next to each other.
- Equal numbers do not count as increasing.
- The list has at least one number.
nums = [10, 9, 2, 5, 3, 7, 101, 18] → 4 (2, 3, 7, 101)Record your take