BFS + HashTableclass Solution { int maxl, minl; unordered_map> hm;public: vector> verticalOrder(TreeNode* root) { maxl = INT_MIN; ...
分类:
其他好文 时间:
2015-12-15 13:59:32
阅读次数:
159
题目:Given a binary tree, find the length of the longest consecutive sequence path.The path refers to any sequence of nodes from some starting node to a...
分类:
其他好文 时间:
2015-12-15 07:45:15
阅读次数:
175
其实和大小没啥太大关系,主要因素是元素个数,也就是说,1,2 和 3,4 可能构成的排列组合个数是一样的,大概的思路就是这样的:式子出来了,那代码也就出来了:int numTrees(int n) { vector treeNumList(n + 1); function getTree...
分类:
其他好文 时间:
2015-12-15 00:59:57
阅读次数:
248
$arg_PARAMETER功能:如果在请求中设置了查询字符串,那么这个变量包含在查询字符串是GET请求PARAMETER中的值。$args功能:该变量的值是GET请求在请求行中的参数。$binary_remote_addr功能:二进制格式的客户端地址$body_bytes_sent功能:响应体的大...
分类:
其他好文 时间:
2015-12-14 22:49:14
阅读次数:
242
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".class Solution {public: std::string addBinar...
分类:
其他好文 时间:
2015-12-14 14:08:14
阅读次数:
111
原帖例一:调用系统的user32.dll函数 MessageBoxW,有4个参数,输出一个整数 ,var FFI = require('ffi');function TEXT(text){ return new Buffer(text, 'ucs2').toString('binary');}v.....
分类:
Web程序 时间:
2015-12-14 10:48:13
阅读次数:
795
Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100".思路:二进制加法计算的步骤: 1、将二进制转化成字符串的形式,这样从高位到地位依次每一...
分类:
其他好文 时间:
2015-12-13 21:56:40
阅读次数:
212
Given a binary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in the...
分类:
其他好文 时间:
2015-12-13 20:23:26
阅读次数:
230
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and sum ...
分类:
其他好文 时间:
2015-12-13 18:47:52
阅读次数:
144
mysql半同步复制和异步复制的区别如上述架构图所看到的:在mysql异步复制的情况下。Mysql Master Server将自己的Binary Log通过复制线程传输出去以后,Mysql Master Sever就自己主动返回数据给client。而无论slave上是否接受到了这个二进制日志。在半...
分类:
数据库 时间:
2015-12-13 18:39:23
阅读次数:
275