码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
平衡树
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:其他好文   时间:2014-10-22 01:06:01    阅读次数:162
POJ 1753 Flip Game
Flip Game Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 31424   Accepted: 13656 Description Flip game is played on a rectangular 4x4 field with two-sided...
分类:其他好文   时间:2014-10-21 23:18:43    阅读次数:314
Same Tree 比较两个二叉树是否完全相同
Given two binarytrees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and...
分类:其他好文   时间:2014-10-21 23:02:04    阅读次数:240
SOJ - 11598
11598. XORConstraintsTime Limit: 1 secs, Memory Limit: 256 MBDescriptionGiven two integersSandF, what is the XOR (exclusive-or) of all numbers between...
分类:其他好文   时间:2014-10-21 22:59:43    阅读次数:438
LeetCode Two Sum
Two Sum Total Accepted: 37848 Total Submissions: 206006 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return ...
分类:其他好文   时间:2014-10-21 21:44:10    阅读次数:267
HDU 1711 Number Sequence(kmp)
Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b...
分类:其他好文   时间:2014-10-21 21:38:27    阅读次数:258
Woody的python学习笔记2
Python多行语句 Python语句中一般以新行作为语句的结束符,但我们可以使用斜杠(\)将一行的语句分为多行显示,如下所示: total = item_one+          item_two +           item_three 语句中包含[],{},()就不需要使用多行连接符,如下:          days =[‘monday’,’tuesday’,’w...
分类:编程语言   时间:2014-10-21 12:19:08    阅读次数:249
[Leetcode] Edit Distance
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:其他好文   时间:2014-10-21 05:43:21    阅读次数:125
[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.Solution:...
分类:其他好文   时间:2014-10-21 02:17:26    阅读次数:157
[Leetcode] Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:其他好文   时间:2014-10-21 02:14:37    阅读次数:266
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!