戳我去解题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
Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identical an...
分类:
其他好文 时间:
2014-05-01 16:06:46
阅读次数:
427
原题地址: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
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
RSA is one of the most powerful methods to encrypt data. The RSA algorithm is described as follow:
> choose two large prime integer p, q
> calculate n = p × q, calculate F(n) = (p - 1) × (q - 1)
...
分类:
其他好文 时间:
2014-04-27 21:37:59
阅读次数:
315