Given a binary tree struct TreeLinkNode {
TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next
pointe...
分类:
其他好文 时间:
2014-07-22 23:16:35
阅读次数:
373
戳我去解题Givennnon-negative integersa1,a2, ...,an,
where each represents a point at coordinate (i,ai).nvertical lines are drawn
such that the two endpoint...
分类:
其他好文 时间:
2014-07-22 23:09:34
阅读次数:
337
原题地址:http://oj.leetcode.com/problems/two-sum/题意:找出数组numbers中的两个数,它们的和为给定的一个数target,并返回这两个数的索引,注意这里的索引不是数组下标,而是数组下标加1。比如numbers={2,7,11,17};
target=9。那...
分类:
编程语言 时间:
2014-04-30 21:45:43
阅读次数:
528
This is a two player game. Initially there
areninteger numbers in an array and playersAandBget chance to take them
alternatively. Each player can take...
分类:
其他好文 时间:
2014-04-30 20:34:38
阅读次数:
519
1.for a two dimension vector, we must assign at
least the first dimension of the vector2.each dimension of an inner vector can
be different3.if you do...
分类:
其他好文 时间:
2014-04-30 18:47:20
阅读次数:
549
题目: 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 sin...
分类:
其他好文 时间:
2014-04-30 18:44:23
阅读次数:
428
2014-04-29
00:56题目:不用算数运算,完成加法。解法:那就位运算吧,用加法器的做法就可以了。代码: 1 // 18.1 add two numbers wihout
using arithmetic operator. 2 #include 3 using namespace std....
分类:
其他好文 时间:
2014-04-29 14:58:53
阅读次数:
383
public class Facade { /** * @param args 外观模式 */ One
one; Two two; Three three; public Facade() { one=new One(); two=new Two();
three=new Three()...
分类:
其他好文 时间:
2014-04-29 11:15:47
阅读次数:
238
题目: 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...
分类:
其他好文 时间:
2014-04-29 10:32:46
阅读次数:
359
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 ...
分类:
其他好文 时间:
2014-04-29 10:17:46
阅读次数:
406