码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
leetcode - Remove Duplicates from Sorted List
题目:Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2...
分类:其他好文   时间:2014-07-10 14:29:45    阅读次数:259
[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...
分类:其他好文   时间:2014-07-10 12:37:21    阅读次数:189
[leetcode] 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.
分类:其他好文   时间:2014-07-10 00:18:17    阅读次数:278
LeetCode::Remove Duplicates from Sorted List II [具体分析]
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:其他好文   时间:2014-07-07 16:17:00    阅读次数:139
leetcode - Merge Two Sorted Lists
题目:Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the ...
分类:其他好文   时间:2014-07-07 14:06:19    阅读次数:221
[leetcode] Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?
分类:其他好文   时间:2014-07-07 13:07:00    阅读次数:153
[leetcode] Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?
分类:其他好文   时间:2014-07-03 11:51:05    阅读次数:117
[leetcode] Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.
分类:其他好文   时间:2014-07-02 00:33:49    阅读次数:204
二分法查找 --JS 实现
var indexOfSorted = function f(arr,n){ //assume : arr has been sorted var low = 0; var high = arr.length - 1; var mid = (low + high) / 2; while(high - low > 1){ if(n == arr[low]){return low...
分类:Web程序   时间:2014-06-30 08:54:10    阅读次数:978
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 O(log (m+n)). 方法 转换为寻找第k大的数。 ...
分类:其他好文   时间:2014-06-30 06:05:58    阅读次数:261
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!