码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
POJ 3468 A Simple Problem with Integers(线段树 区间更新)
Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other ...
分类:其他好文   时间:2014-08-05 11:15:59    阅读次数:243
Common Words
Common WordsLet's continue examining words. You are given two string with words separated by commas. Try to find what is common between these strings....
分类:其他好文   时间:2014-08-05 10:54:19    阅读次数:190
Speech Module
Speech Module 1 FIRST_TEN = ["one", "two", "three", "four", "five", "six", "seven", 2 "eight", "nine"] 3 SECOND_TEN = ["ten", "eleven", "...
分类:其他好文   时间:2014-08-05 10:49:49    阅读次数:218
Recover Binary Search Tree leetcode java
题目:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space....
分类:编程语言   时间:2014-08-05 05:17:28    阅读次数:265
Metric Space
Metric spaces is a large class of spaces on which the closeness of two points is depicted by a distance function, or called a metric. Metric spaces ar...
分类:其他好文   时间:2014-08-05 03:04:28    阅读次数:220
LeetCode第四题,Add Two Numbers
题目原文: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it ...
分类:其他好文   时间:2014-08-05 00:51:58    阅读次数:257
LeetCode :: Search 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). You are given a target value to search. If found in the array retur...
分类:其他好文   时间:2014-08-05 00:48:58    阅读次数:248
[LeetCode] Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates": What if duplicates are allowed at most twice?For example, Given sorted array A = [1,1,1,2,2,3],Your function should...
分类:其他好文   时间:2014-08-05 00:24:38    阅读次数:281
Leetcode--Divide Two Integers
Problem Description: Divide two integers without using multiplication, division and mod operator. 分析:题目意思很容易理解,就是不用乘除法和模运算求来做除法,很容易想到的一个方法是一直做减法,然后计数,但是提交之后显示超时,在网上找到一种解法,利用位运算,意思是任何一个整数可以表示成以2的幂为...
分类:其他好文   时间:2014-08-04 21:33:28    阅读次数:307
[LeetCode] 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.方法:为了使BST高度平衡,要找链表中的中值作为当前根节点。/** * Defin...
分类:其他好文   时间:2014-08-04 20:37:47    阅读次数:194
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!