码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
leetcode 2.Median of Two Sorted Arrays
Median of Two Sorted Arrays Problem:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The ov...
分类:其他好文   时间:2014-10-10 00:04:57    阅读次数:296
LeetCode Search in Rotated Sorted Array
Search in Rotated Sorted Array  Total Accepted: 27955 Total Submissions: 97929My Submissions Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 ...
分类:其他好文   时间:2014-10-09 16:29:38    阅读次数:177
第十二题 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 to m + n) to hold additional elements fro...
分类:其他好文   时间:2014-10-09 15:58:28    阅读次数:232
Searching an Element in a 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). How do you find an elemen...
分类:其他好文   时间:2014-10-09 14:22:13    阅读次数:332
Finding intersection of two sorted arrays
Find the intersection of two sorted arrays.Let’s called array1 as A and array2 as B, each with size m and n.The obvious brute-force solution is to sca...
分类:其他好文   时间:2014-10-09 14:20:13    阅读次数:161
LeetCode Remove Duplicates from Sorted Array II
title  描述  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...
分类:其他好文   时间:2014-10-09 03:14:48    阅读次数:163
LeetCode Remove Duplicates from Sorted Array
问题描述: 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 in place ...
分类:其他好文   时间:2014-10-09 02:58:47    阅读次数:175
leetcode_1线性表_1数组_1&2Remove Duplicates from Sorted Array I & II
1.1.1 Remove Duplicates from Sorted Array题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the ...
分类:其他好文   时间:2014-10-08 14:20:45    阅读次数:229
Median of Two Sorted Arrays
[leetcode]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))....
分类:其他好文   时间:2014-10-08 14:00:15    阅读次数:147
Convert Sorted Array to Binary Search Tree
[leetcode]Given an array where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2014-10-08 10:09:55    阅读次数:164
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!