Longest Increasing Subsequence
Problem Find the length of the longest strictly increasing subsequence of an array. A subsequence keeps relative order but need not be contiguous.
Input / Output
- Input: an integer array
nums. - Output: the length of the longest strictly increasing subsequence.
Constraints
1 <= nums.length <= 2500- Strictly increasing (equal values do not extend the sequence).
Example
[10,9,2,5,3,7,101,18]->4(e.g.[2,3,7,101]).
added …