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
The gray code is a binary numeral system where two successive values differ in only one bit.
分类:
其他好文 时间:
2014-07-02 14:47:43
阅读次数:
253
An L-value is something that can appear on the left side of an equal sign,An R-value is something that can appear on the right side of an equal sign.....
分类:
其他好文 时间:
2014-07-02 10:08:37
阅读次数:
295
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
分类:
其他好文 时间:
2014-07-02 10:03:09
阅读次数:
175
(一)二分的模版:
int binary_search(int *array, int length, int key) {
int start = 0, end = length - 1;
while(end >= start) {
int middle = start + (end - start) / 2;
int tmp = array[middle];
if(tmp <...
分类:
其他好文 时间:
2014-07-02 08:19:05
阅读次数:
211
1971. Graphics Settings
Time limit: 2.0 second
Memory limit: 64 MB
给定n个选项,m个操作,问the image generation speed=p/(W*H*∏ki(第i个选项开启))在哪个区间。
Input
第一行为 n (0 ≤ n ≤ 100 000). 接下来第i行分别有指令名 si, ...
分类:
其他好文 时间:
2014-07-02 08:16:27
阅读次数:
333
使用panel的onMove事件解决了panel,dialog以及window组件在被拖动时,会超出浏览器边界而无法拖回的情况。
当窗口被拖出浏览器有边界时,$(document).width();会增大,增大的部分就是窗口超过浏览器窗口的部分,所以right > browserWidth条件永远无法满足。...
分类:
Web程序 时间:
2014-07-02 08:15:42
阅读次数:
204
[LeetCode]Maximum Depth of Binary Tree...
分类:
其他好文 时间:
2014-07-02 08:09:01
阅读次数:
175
ERROR 1665 (HY000): Cannot executestatement: impossible to write to binary log since BINLOG_FORMAT = STATEMENTand at least one table uses a storage engine limited to row-based logging.InnoDB is limited to row-logging when transaction isolation level is REA...
分类:
数据库 时间:
2014-07-02 07:46:46
阅读次数:
322
判断一个二叉树是否是轴对称的是一个经典的算法问题,下面结合leetcode上的Symmetric Tree给出判断对称树的两种方法。
先看看问题描述:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, t...
分类:
其他好文 时间:
2014-07-02 06:58:05
阅读次数:
208