码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
Leetcode: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-01-06 17:46:21    阅读次数:138
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-06 17:28:25    阅读次数:175
[C++]LeetCode: 72 Remove Duplicates from Sorted Array II
题目: 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 no...
分类:编程语言   时间:2015-01-06 15:41:57    阅读次数:163
Leetcode:Merge Sorted Array
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 equal...
分类:其他好文   时间:2015-01-06 15:28:32    阅读次数:131
[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 7might become4 5 6 7 0 1 2).Find the minimum element.You m...
分类:其他好文   时间:2015-01-06 15:15:40    阅读次数:111
[LeetCode#34]Search for a Range
The problem:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must b...
分类:其他好文   时间:2015-01-06 13:46:08    阅读次数:90
[LeetCode]21.Merge Two Sorted Lists
【题目】 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 【分析】 无 【代码】 /*******************************...
分类:其他好文   时间:2015-01-06 11:59:33    阅读次数:155
Find Minimum in Rotated Sorted Array II
Find Minimum in Rotated Sorted Array II...
分类:其他好文   时间:2015-01-06 10:00:23    阅读次数:156
[LeetCode#81]Search in Rotated Sorted Array II
The problem:Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a...
分类:其他好文   时间:2015-01-06 09:42:10    阅读次数:185
[LeetCode#33]Search in Rotated Sorted Array
Problem: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...
分类:其他好文   时间:2015-01-06 08:34:00    阅读次数:180
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!