码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
【题解】【数组】【Leetcode】Median of Two Sorted Arrays
####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 overa...
分类:其他好文   时间:2014-05-26 23:13:41    阅读次数:265
JAVA集合小结
public class HashMap extends AbstractMap implements Map, Cloneable, Serializablepublic class TreeMap extends AbstractMap implements Sorted...
分类:编程语言   时间:2014-05-26 13:34:23    阅读次数:268
Leetcode: Merge Sorted Array
这种题都采用倒序的方式吧,从大到小添加。要注意的是一些小细节:比如for(int i = m+n-1; i >=0; i--){}, 在for语句里面已经有i--了,循环里面就不需要再写一个i--了 1 public class Solution { 2 public void merge(...
分类:其他好文   时间:2014-05-26 12:14:48    阅读次数:227
Leetcode: Convert Sorted Array to Binary Search Tree
基本上一次过,要注意边界条件的问题:如果在recursion里有两个参数int begin, end, 递归写作recursion(num, mid+1, end), 因为+号的原因,递归中是会出现begin > end 的情况的,所以考虑初始条件的时候应该要考虑充分。 1 /** 2 * Def....
分类:其他好文   时间:2014-05-26 12:12:49    阅读次数:257
Remove Duplicates from Sorted Array II
Remove Duplicates from Sorted Array II
分类:其他好文   时间:2014-05-26 01:20:51    阅读次数:159
[LeetCode]Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array...
分类:其他好文   时间:2014-05-22 23:06:48    阅读次数:271
10.排序数组中和为给定值的两个数字
Find 2 numbers with given sum in sorted array.
分类:其他好文   时间:2014-05-22 01:53:17    阅读次数:288
【leetcode】Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:其他好文   时间:2014-05-21 20:00:51    阅读次数:296
【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-...
分类:其他好文   时间:2014-05-21 17:51:09    阅读次数:190
[LeetCode]Merge k Sorted Lists
Merge k Sorted Lists...
分类:其他好文   时间:2014-05-21 08:20:14    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!