码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
【leetcode】Convert Sorted List to Binary Search Tree
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2015-01-11 14:46:32    阅读次数:160
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...
分类:其他好文   时间:2015-01-11 14:46:25    阅读次数:148
【leetcode】Convert Sorted Array to Binary Search Tree
Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.每次把中间元素当成根节...
分类:其他好文   时间:2015-01-11 12:10:19    阅读次数:137
Search in Rotated Sorted Array -- leetcode
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). You are given a target value to search. If found in the array return its ...
分类:其他好文   时间:2015-01-11 09:45:00    阅读次数:219
LeetCode-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 order. You may assume no duplicates in the array....
分类:其他好文   时间:2015-01-11 09:44:06    阅读次数:137
leetcode 154/153. Find Minimum in Rotated Sorted Array && II
Suppose 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).Find the minimum element.You m...
分类:其他好文   时间:2015-01-10 11:15:19    阅读次数:187
Pat(Advanced Level)Practice--1089(Insert or Merge )
Pat1089代码 题目描述: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element ...
分类:其他好文   时间:2015-01-10 01:31:42    阅读次数:282
Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2015-01-09 22:29:55    阅读次数:181
LeetCode-Search a 2D Matrix
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The first integer of each...
分类:其他好文   时间:2015-01-09 22:27:36    阅读次数:272
[LeetCode] Find Minimum in Rotated Sorted Array II
Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a sort...
分类:其他好文   时间:2015-01-09 20:54:15    阅读次数:196
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!