![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数组
景行cmy
这个作者很懒,什么都没留下…
展开
-
leetcode 41. First Missing Positive
Given an unsorted integer array, find the smallest missingpositive integer. Example 1: Input: [1,2,0] Output: 3 Example 2: Input: [3,4,-1,1] Output: 2 Example 3: Input: [7,8,9,11,12] Outpu...转载 2019-07-15 10:25:35 · 59 阅读 · 0 评论 -
leetcode 57. Insert Interval
Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Examp...原创 2019-07-15 13:43:57 · 68 阅读 · 0 评论 -
leetcode 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. Example: Input:[100, 4, 200, 1, 3, 2] Output: 4 Ex...原创 2019-07-15 14:56:05 · 95 阅读 · 0 评论 -
leetcode 381. Insert Delete GetRandom O(1) - Duplicates allowed
Design a data structure that supports all following operations inaverageO(1)time. Note: Duplicate elements are allowed. insert(val): Inserts an item val to the collection. remove(val): Remove...原创 2019-07-15 16:34:53 · 84 阅读 · 0 评论