码迷,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...
分类:其他好文   时间:2014-09-05 12:37:51    阅读次数:215
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-09-05 05:31:40    阅读次数:176
Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:其他好文   时间:2014-09-05 05:31:30    阅读次数:224
LeetCode--Merge Two Sorted Lists
重新写了下,代码看着清爽多了 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x...
分类:其他好文   时间:2014-09-04 20:54:00    阅读次数:162
LeetCode: Search in Rotated Sorted Array
LeetCode: Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 ...
分类:其他好文   时间:2014-09-03 23:57:17    阅读次数:467
LeetCode: Remove Duplicates from Sorted List
LeetCode: Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear only once. For example,Giv...
分类:其他好文   时间:2014-09-03 22:27:17    阅读次数:311
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 complexity must be in the ord...
分类:其他好文   时间:2014-09-03 21:06:47    阅读次数:241
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...
分类:其他好文   时间:2014-09-03 19:50:37    阅读次数:156
Redis之七种武器
长生剑、孔雀翎、碧玉刀、多情环、离别钩、霸王枪、拳头是古龙笔下的七种武器,而本文打算将Redis的几种使用方式 Strings、Hashs、Lists、Sets、Sorted Sets、Pub/Sub、Transactions 也比作七种武器,为大家讲解Redis的七种特性,并列举其适合的应用场景。...
分类:其他好文   时间:2014-09-03 16:30:46    阅读次数:180
Merge Sorted Array <leetcode>
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...
分类:其他好文   时间:2014-09-03 11:05:46    阅读次数:168
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!