![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
Robin_just
这个作者很懒,什么都没留下…
展开
-
Remove Duplicates from Sorted Array
/* Description: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this i原创 2017-04-30 21:56:24 · 220 阅读 · 0 评论 -
Remove Duplicates from Sorted Array II
/* Description: Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array A = [1,1,1,2,2,3], Your function should return length = 5, and A is now原创 2017-05-05 11:58:48 · 216 阅读 · 0 评论 -
Search in Rotated Sorted Array
/* Description: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value to search. If found in the arra原创 2017-05-05 23:45:06 · 252 阅读 · 0 评论 -
Search in Rotated Sorted Array II
/* Description: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value to search. If found in the arra原创 2017-05-06 00:27:46 · 189 阅读 · 0 评论 -
Median of Two Sorted Arrays
/* Description: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log(m + n)). 给定两个已经排序好的数组,找到两者的中值原创 2017-05-08 13:06:42 · 238 阅读 · 0 评论