![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Array
路漫漫,远修兮
这个作者很懒,什么都没留下…
展开
-
LeetCode_26. Remove Duplicates from Sorted Array_路漫漫远修兮
一、原题目Given a sorted arraynums, remove the duplicatesin-placesuch that each element appear onlyonceand return the new length.Do not allocate extra space for another array, you must do this ...原创 2019-03-24 18:46:18 · 146 阅读 · 0 评论 -
LeetCode_80. Remove Duplicates from Sorted Array II_路漫漫远修兮
一、原题目Given a sorted arraynums, remove the duplicatesin-placesuch that duplicates appeared at mosttwiceand return the new length.Do not allocate extra space for another array, you must do t...原创 2019-03-24 19:02:31 · 114 阅读 · 0 评论 -
LeetCode_11. Container With Most Water_路漫漫远修兮
一、原题目Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of lineiis at (i,ai) and (i, 0)...原创 2019-03-25 21:58:28 · 102 阅读 · 0 评论 -
LeetCode_334. Increasing Triplet Subsequence_路漫漫远修兮
一、原题目Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array.Formally the function should:Return true if there existsi, j, ksuch thatarr[i]...原创 2019-03-26 20:04:42 · 97 阅读 · 0 评论 -
LeetCode_217. Contains Duplicate_路漫漫远修兮
一、原题目Given an array of integers, find if the array contains any duplicates.Your function should return true if any value appears at least twice in the array, and it should return false if every...原创 2019-03-26 20:28:55 · 181 阅读 · 0 评论 -
LeetCode_219. Contains Duplicate II_路漫漫远修兮
一、原题目Given an array of integers and an integerk, find out whether there are two distinct indicesiandjin the array such thatnums[i] = nums[j]and theabsolutedifference betweeniandjis a...原创 2019-03-26 20:57:22 · 125 阅读 · 0 评论 -
LeetCode_220. Contains Duplicate III_路漫漫远修兮
一、原题目Given an array of integers, find out whether there are two distinct indicesiandjin the array such that theabsolutedifference betweennums[i]andnums[j]is at mosttand theabsoluted...原创 2019-03-26 21:23:36 · 147 阅读 · 0 评论 -
LeetCod_27Remove Element
一、原题目Given an arraynumsand a valueval, remove all instances of that valuein-placeand return the new length.Do not allocate extra space for another array, you must do this bymodifying the i...原创 2019-03-24 17:13:36 · 161 阅读 · 0 评论 -
LeetCod_128. Longest Consecutive Sequence_路漫漫远修兮
一、原题目Given an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run in O(n) complexity.二、题目大意给定一个含有数字的列表,求连续数的最大长度。三、思路分析...原创 2019-03-27 21:14:06 · 139 阅读 · 0 评论