码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
LeetCode--Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. E...
分类:其他好文   时间:2015-01-16 13:13:25    阅读次数:154
Convert Binary Search Tree (BST) to Sorted Doubly-Linked List
(http://leetcode.com/2010/11/convert-binary-search-tree-bst-to.html)Convert a BST to a sorted circular doubly-linked list in-place. Think of the left ...
分类:其他好文   时间:2015-01-16 08:42:31    阅读次数:156
LeetCode--Find Minimum in Rotated Sorted Array II
Follow up for "Find Minimum in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose a sorted array is rotated at some pivot u...
分类:其他好文   时间:2015-01-15 22:14:10    阅读次数:166
LeetCode--Find Minimum in 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). Find the minimum element. You may assume no duplicate exists in ...
分类:其他好文   时间:2015-01-15 22:13:10    阅读次数:176
[leetCode][013] Two Sum 2
题目:Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The functi...
分类:其他好文   时间:2015-01-15 21:51:33    阅读次数:159
[LeetCode] Convert Sorted List to Binary Search Tree DFS,深度搜索
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.Hide TagsDepth-first SearchLinked List 这....
分类:其他好文   时间:2015-01-15 21:47:04    阅读次数:171
leetcode 21.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.为了方便表头处理,...
分类:其他好文   时间:2015-01-14 17:54:36    阅读次数:242
LeetCode88——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 ...
分类:其他好文   时间:2015-01-14 16:54:36    阅读次数:183
LeetCode--Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * ...
分类:其他好文   时间:2015-01-14 15:35:32    阅读次数:178
LeetCode--Convert Sorted List to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *nex...
分类:其他好文   时间:2015-01-14 15:33:27    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!