Leetcode#300. Longest Increasing Subsequence
Problem
Given an integer array nums
, return the length of the longest strictly increasing
subsequence
.
Example 1:
1 | Input: nums = [10,9,2,5,3,7,101,18] |
Example 2:
1 | Input: nums = [0,1,0,3,2,3] |
Example 3:
1 | Input: nums = [7,7,7,7,7,7,7] |
Constraints:
1 <= nums.length <= 2500
104 <= nums[i] <= 104
Follow up: Can you come up with an algorithm that runs in O(n log(n))
time complexity?
Solve
1 | class Solution: |
寫的時候1次過,嘿嘿(,,・ω・,,)
本部落格所有文章除特別聲明外,均採用 CC BY-NC-SA 4.0 許可協議。轉載請註明來自 Imisky!
評論