![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
HowlandDong
本科毕业于中国海洋大学信息工程学院,硕士研究生毕业于信息工程大学;关注:图像处理,机器学习。
展开
-
【leetcode】66. Plus One
#include <vector>#include <iostream>#include <algorithm>using namespace std;int main(int argc, char **argv) { vector<int> digits; digits.push_back(9); std::vector<int>::iterator end; end=digi原创 2015-12-28 17:26:11 · 299 阅读 · 0 评论 -
【leetcode】189. Rotate Array
题目Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].代码#include <algorithm>#include <iostream>#include <v原创 2015-12-28 18:19:50 · 229 阅读 · 0 评论 -
【leetcode】27. Remove Element
题目Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn’t matter what you leave beyond the new length.代码#inclu原创 2015-12-28 18:24:25 · 243 阅读 · 0 评论 -
【leetcode】15. 3Sum
leetcode 题目 3Sum原创 2016-01-04 22:19:31 · 311 阅读 · 0 评论 -
【leetcode】217. Contains Duplicate
#include <sys/time.h>#include <algorithm>#include <iostream>#include <unordered_set>#include <vector>using namespace std;bool containsDuplicate(vector<int>& nums) { unordered_set<int> us; for( a原创 2015-12-27 13:03:58 · 305 阅读 · 0 评论