码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
[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 two lists./** * Def...
分类:其他好文   时间:2014-06-21 07:55:42    阅读次数:197
LeetCode:Divide Two Integers
题目链接 Divide two integers without using multiplication, division and mod operator. 最直观的方法是,用被除数逐个的减去除数,直到被除数小于0。这样做会超时。 本文地址 那么如果每次不仅仅减去1个除数,计算速度就会增加,但...
分类:其他好文   时间:2014-06-21 07:44:52    阅读次数:221
[LeetCode] 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...
分类:其他好文   时间:2014-06-21 07:30:11    阅读次数:157
[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 or...
分类:其他好文   时间:2014-06-21 06:58:22    阅读次数:186
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.个人思路:1、选...
分类:其他好文   时间:2014-06-21 06:37:00    阅读次数: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.说明:平衡二叉搜索树,即任何结点的左子树和右子树高度最多相差1的二叉搜索树。二叉搜索树:二叉查找树(Bin...
分类:其他好文   时间:2014-06-21 00:47:08    阅读次数:221
[leetcode] 4. Median of Sorted Arrays
// Question: 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 complexi...
分类:其他好文   时间:2014-06-21 00:22:23    阅读次数:255
Clojure:将两个list合并成一个map
假设我们有两个list,分别是:(def a [“one” “two” “three”])(def b [1 2 3])我们要把它们合为一个键值对应的map,做法很简单:1. 先将a和b合为一个一一对应的list:(map vector a b) => (["one" 1] ["two" 2] ["...
分类:其他好文   时间:2014-06-20 23:32:09    阅读次数:237
[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...
分类:其他好文   时间:2014-06-20 21:48:33    阅读次数:254
Request.Form为什么不能获取html传递来的数据?
//只有form method="get"时才可用Request.QueryString["one"]方法//stringone=Request.QueryString["one"];//stringtwo=Request.QueryString["two"];//只有form method="po...
分类:Web程序   时间:2014-06-20 20:28:02    阅读次数:308
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!