###### Longest increasing subsequence |LeetCode

int lengthOfLIS1(vector<int>& nums) {

if(nums.size()==0)
return  0;
vector<int> res;
for(int i=0;i<nums.size();++i){
auto it=lower_bound(res.begin(),res.end(),nums[i]);
if(it==res.end())
res.push_back(nums[i]);//insert new element
else
*it=nums[i];//update some element at res
}
return res.size();
}

#### LeetCode 300. Longest Increasing Subsequence 解题报告

2016-02-16 19:35:07

#### 【LEETCODE】300-Longest Increasing Subsequence [Python]

2016-01-07 20:36:24

#### leetcode 300. Longest Increasing Subsequence-最长子序列|动态规划

2016-06-02 20:17:05

#### leetcode（300）—— Longest Increasing Subsequence（最长递增子序列）

2016-06-08 11:33:06

#### LWC 49：674. Longest Continuous Increasing Subsequence

2017-09-10 14:03:50

#### Leetcode 300 Longest Increasing Subsequence（Python）

2016-07-19 01:57:14

#### leetcode 300: Longest Increasing Subsequence

2015-11-03 11:24:29

#### 673. Number of Longest Increasing Subsequence 最长递增子序列的个数

2017-09-22 10:55:35

#### 最长递增子序列O(NlogN)算法（leetcode 300. Longest Increasing Subsequence ）

2016-04-16 21:06:45

#### LeetCode 300. Longest Increasing Subsequence（最长递增子序列）

2016-04-17 06:43:52

## 不良信息举报

Longest increasing subsequence |LeetCode