码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
Search for a Range -- leetcode
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 order of O(log n). If the target is not found in...
分类:其他好文   时间:2015-01-12 09:29:25    阅读次数:119
Search Insert Position -- leetcode
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-12 09:27:17    阅读次数:136
Find Minimum in Rotated Sorted Array leetcode java
题目: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 elemen....
分类:编程语言   时间:2015-01-12 06:47:23    阅读次数:173
[LeetCode][Python]Median of Two Sorted Arrays
# -*- coding: utf8 -*-'''https://oj.leetcode.com/problems/median-of-two-sorted-arrays/There are two sorted arrays A and B of size m and n respectively...
分类:编程语言   时间:2015-01-12 01:34:26    阅读次数:214
Find the k-th Smallest Element in the Union of Two Sorted Arrays
Given two sorted arrays A, B of size m and n respectively. Find the k-th smallest element in the union of A and B. You can assume that there are no du...
分类:其他好文   时间:2015-01-11 22:48:15    阅读次数:187
leetcode 【 Convert Sorted List to Binary Search Tree 】python 实现
题目:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.代码:oj测试通过Runtime:178 ms 1 # Definition...
分类:编程语言   时间:2015-01-11 20:18:51    阅读次数:235
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 17:53:05    阅读次数:140
LeetCode--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 order of O(log n). If the target is not found ...
分类:其他好文   时间:2015-01-11 17:51:10    阅读次数:190
Median of 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 ...
分类:其他好文   时间:2015-01-11 15:59:32    阅读次数:181
LeetCode---Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place with...
分类:其他好文   时间:2015-01-11 14:55:05    阅读次数:164
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!