码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
Search a 2D Matrix
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:其他好文   时间:2015-03-12 20:32:09    阅读次数:143
Search in Rotated Sorted Array 【新思路】
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).You are given a target value t...
分类:其他好文   时间:2015-03-12 14:35:17    阅读次数:105
Find Minimum in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.You m...
分类:其他好文   时间:2015-03-12 11:17:06    阅读次数:104
[LeetCode]Find Minimum in Rotated Sorted Array
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). Find the minimum element. You may assume no duplicate...
分类:其他好文   时间:2015-03-11 23:30:19    阅读次数:242
LeetCode 笔记28 Maximum Gap
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:其他好文   时间:2015-03-11 23:05:38    阅读次数:170
【leetcode】Remove Duplicates from Sorted List II (middle)
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2015-03-11 22:56:36    阅读次数:202
Search for a Range
Search for a Range问题:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexi...
分类:其他好文   时间:2015-03-11 22:54:22    阅读次数:247
leetcode: 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 shoul...
分类:其他好文   时间:2015-03-11 21:30:30    阅读次数:123
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-03-11 21:10:33    阅读次数:98
LeetCode-154 Find Minimum in Rotated Sorted Array II
Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a sort...
分类:其他好文   时间:2015-03-11 19:18:11    阅读次数:108
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!