
two pointers
文章平均质量分 74
jialuyyy
这个作者很懒,什么都没留下…
展开
-
Remove Duplicates from Sorted Array I, II
Remove Duplicates from Sorted Array II Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array nums = [1,1,1,2,2,3], You原创 2015-06-19 06:13:13 · 269 阅读 · 0 评论 -
Missing Ranges
Missing Ranges Given a sorted integer array where the range of elements are [lower, upper] inclusive, return its missing ranges. For example, given [0, 1, 3, 50, 75], lower = 0 and u原创 2015-06-19 23:25:25 · 193 阅读 · 0 评论 -
Minimum Size Subarray Sum
Minimum Size Subarray Sum Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return 0 inst原创 2015-06-21 01:59:41 · 188 阅读 · 0 评论 -
Implement strStr()
Implement strStr() Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Update (2014-11-02): The signatur原创 2015-06-04 21:55:47 · 207 阅读 · 0 评论