码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
LeetCode - Maximum Gap
Maximum Gap2015.1.23 15:00Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in l...
分类:其他好文   时间:2015-01-23 16:10:03    阅读次数:111
LeetCode - Find Minimum in Rotated Sorted Array II
Find Minimum in Rotated Sorted Array II2015.1.23 11:41Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7mig...
分类:其他好文   时间:2015-01-23 13:08:41    阅读次数:135
Leetcode#33 Search in Rotated Sorted Array
原题地址跟Find Minimum in Rotated Array类似,折半查找将A平均分成两半A[l..m]和A[m+1..r]如果target可能出现在A[l..m],则保留A[l..m],去掉A[m+1..r]反之,保留A[m+1..r],去掉A[l..m]。根据区间的连续性判断target...
分类:其他好文   时间:2015-01-23 12:41:22    阅读次数:176
Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2015-01-22 15:19:51    阅读次数:118
LeetCode - Find Minimum in Rotated Sorted Array
Find Minimum in Rotated Sorted Array2015.1.22 07:07Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might ...
分类:其他好文   时间:2015-01-22 08:13:52    阅读次数:139
[LeetCode] Remove Duplicates from Sorted List II 链表
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2015-01-22 01:41:03    阅读次数:111
[LeetCode] Search in Rotated Sorted Array II 二分搜索
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:其他好文   时间:2015-01-22 01:40:55    阅读次数:130
[LeetCode] Search Insert Position 二分搜索
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:其他好文   时间:2015-01-22 01:38:07    阅读次数:116
leetcode 【 Merge Sorted Array 】python 实现
题目:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or eq...
分类:编程语言   时间:2015-01-21 23:53:45    阅读次数:175
Median of Two Sorted Arrays
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 ...
分类:其他好文   时间:2015-01-21 21:58:16    阅读次数:273
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!