码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
[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-08-14 01:01:07    阅读次数:230
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...
分类:其他好文   时间:2014-08-13 22:15:17    阅读次数:221
leetcode 刷题之路 76 Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, return 1->2->3. 删除排序链表中重复的节点,删除操作...
分类:其他好文   时间:2014-08-11 18:01:22    阅读次数:243
[LeetCode]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)). public class Solution { ...
分类:其他好文   时间:2014-08-11 15:14:12    阅读次数:188
leetcode 刷题之路 70 earch 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 order. You may assume no duplicates in the array....
分类:其他好文   时间:2014-08-10 18:48:50    阅读次数:203
[leetcode]Search in Rotated Sorted Array
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 7might become4 5 6 7 0 1 2)....
分类:其他好文   时间:2014-08-09 18:27:48    阅读次数:148
[leetcode]Search for a Range
Search for a RangeGiven a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity ...
分类:其他好文   时间:2014-08-09 18:18:28    阅读次数:214
[leetcode]Search Insert Position
Search Insert PositionGiven 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 ...
分类:其他好文   时间:2014-08-09 18:10:28    阅读次数:178
LeetCode——Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the...
分类:其他好文   时间:2014-08-09 11:38:57    阅读次数:147
Remove Duplicates from Sorted Array
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:其他好文   时间:2014-08-08 23:52:12    阅读次数:238
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!