04.14 · Problem
Longest Increasing Subsequence
Return the length of the longest strictly increasing subsequence of nums. A subsequence keeps the order but may skip elements.
Examples
Example 1
Input: nums = [10, 9, 2, 5, 3, 7, 101, 18]
Output: 4
For example [2, 3, 7, 101].
solulu Pro
Continue this problem with Pro
Inside: step-by-step hints · 12 hidden tests · reference solutions · code editor.
Lifetime ₹1,999 ₹999 · Launch offer
Item 40 of 44 · updated 2026-10-13