码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
34. Convert Sorted List to Binary Search Tree && Convert Sorted Array to Binary Search Tree
思想: 以中间点为根节点,按先序顺序来创建 。
分类:其他好文   时间:2014-08-27 18:33:28    阅读次数:248
leetcode之Search in Rotated Sorted Array,剑指offer之旋转数组的最小数字
输入一个递增数组的旋转,...
分类:其他好文   时间:2014-08-27 16:39:18    阅读次数:196
leetcode之Median of Two Sorted Arrays
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 (...
分类:其他好文   时间:2014-08-27 14:47:18    阅读次数:148
leetcode之Gray Code
Gray Code The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the cod...
分类:其他好文   时间:2014-08-27 14:45:48    阅读次数:236
LeetCode 34 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 in t...
分类:其他好文   时间:2014-08-27 13:05:17    阅读次数:226
LeetCode总结 -- 一维数据合并篇
合并是一维数据结构中很常见的操作, 通常是排序, 分布式算法中的子操作。 这篇总结主要介绍LeetCode中关于合并的几个题目: Merge Two Sorted ListsMerge Sorted ArraySort ListMerge k Sorted Lists我们先来看看两个有序一维数据的合并, 这里主要是要介绍链表的合并操作, 不过因为一维数组的合并也比较简单, 而且与链表有比较性, 就...
分类:其他好文   时间:2014-08-27 12:59:07    阅读次数:348
【leetcode】Container With Most Water
题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) ...
分类:其他好文   时间:2014-08-27 09:29:57    阅读次数:174
ubuntu DNS 导致apt-get install 无效问题
There are two parts to your question:fixingtemporary resolvemessagesfixing the package management issuesTemporary resolveIt is likely that this issue ...
分类:其他好文   时间:2014-08-27 09:20:07    阅读次数:248
python学习
字典的排序:按键排序sorted(dic.iteritems(),key=lambdadic:dic[0],reverse=False)按值排序sorted(dic.iteritems(),key=lambdadic:dic[1],reverse=False)如果在继承关系中,父类中的字段是__fi...
分类:编程语言   时间:2014-08-27 08:10:37    阅读次数:276
N-Queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all d...
分类:其他好文   时间:2014-08-27 00:11:56    阅读次数:308
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!