Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2014-07-02 21:13:05
阅读次数:
170
IE 6下expected identifier,string or number(缺少标示符、字符串或数字)其实就是多了一个逗号,之前没发现
分类:
编程语言 时间:
2014-07-02 17:49:13
阅读次数:
206
Team USA Soccer Gear Sales Get World Cup AssistMaybe there's something to all that talk aboutAmerica catching the soccer bug. The recent success of th...
分类:
其他好文 时间:
2014-07-02 17:38:55
阅读次数:
258
Given an encoded message containing digits, determine the total number of ways to decode it.
分类:
其他好文 时间:
2014-07-02 14:47:02
阅读次数:
217
11885 - Number of Battlefields
题意:给周长,求能围成的战场数目,不包括矩形。
思路:具体的递推没递推出来,但是看了网上一个规律,如果包括矩形的答案应该是斐波那契数列(但是奇数情况为0),然后减去矩形数目就是答案,矩形数目为n / 2 - 1,用矩阵快速幂就能求了。
具体的递推过程哪位大神能指点下。。。
代码:
#includ...
分类:
其他好文 时间:
2014-07-02 09:24:28
阅读次数:
175
Picture
Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2578 Accepted Submission(s): 1363
Problem Description
A number of rectangul...
分类:
其他好文 时间:
2014-07-02 08:22:20
阅读次数:
388
[LeetCode]Maximum Depth of Binary Tree...
分类:
其他好文 时间:
2014-07-02 08:09:01
阅读次数:
175
[LeetCode]Single Number...
分类:
其他好文 时间:
2014-07-02 07:18:14
阅读次数:
221
【题目】
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
【题意】
给定一堆点,要求找出一条之前上的最大点数
【思路】
没什么好的方法,从每个点P出发,遍历所有的情况
从每个点P出发,斜率相同的点即为统一之前上的点
注意两种特殊情况:
1. 两个点重合(即为同一个点)
...
分类:
其他好文 时间:
2014-07-02 06:52:06
阅读次数:
171
Math对象:该对象提供了大量的数学常量和数学函数。使用Math对象时,不应该使用new关键字创建对象,而应直接使用。如:Math.PI;例子:随机产生指定位数的验证码Number对象的创建:1.varnum=newNumber(object);2.varnum=Number(object);Number对象的属性:1.MAX_VALUE属性2.MIN_..
分类:
编程语言 时间:
2014-07-02 06:23:05
阅读次数:
285