题目: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 ...
分类:
编程语言 时间:
2015-10-21 00:05:15
阅读次数:
251
二进制加法输入2个字符串,字符串内由0和1组成;计算二者之和,返回字符串Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100". 1 package ...
分类:
数据库 时间:
2015-10-20 22:44:36
阅读次数:
240
环境:一台CentOS6.5-x64最小化安装(ip:10.0.0.226)软件:jdk-8u60-linux-x64.rpm,amoeba-mysql-binary-2.2.0.tar.gz下载地址:链接:http://pan.baidu.com/s/1c04Wmys密码:4tqe2.一台CentOS6.5-x64最小化安装(ip:10.0.0.222)为了节省资源,本次使用的是mysql多实例。3306为主(..
分类:
数据库 时间:
2015-10-20 19:43:35
阅读次数:
306
https://leetcode.com/problems/invert-binary-tree/Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9...
分类:
其他好文 时间:
2015-10-20 15:19:13
阅读次数:
113
链接:https://leetcode.com/problems/maximal-rectangle/【描述】Given a 2D binary matrix filled with '0's and '1's, find the largest rectangle containing all o...
分类:
其他好文 时间:
2015-10-20 12:09:18
阅读次数:
242
本来以为这题很简单,但是看要求,第一不能改变这个数组,第二只能使用O(1)的空间,第三时间复杂度小于O(n^2),就不能使用遍历数组的方式来解决了。 有两种方法,一种是利用Binary Search,一种是利用Floyd的cycle detection算法。 Binary Search M...
分类:
其他好文 时间:
2015-10-19 12:33:52
阅读次数:
224
Sliding window doesn't work. So it is a typical partial_sum base solution. As below. However if you use a balanced binary search tree, you can get O(n...
分类:
其他好文 时间:
2015-10-19 07:09:26
阅读次数:
1302
此问题是由能力很困扰,通常有以下几个方案进target的 Build Phases- Link binary Library。到场libPods.a,假设是红。删,能够其他解决方案Build Setting > Other Linker Flag:Try to change wherever $(T...
分类:
其他好文 时间:
2015-10-18 15:27:45
阅读次数:
159
这道题属于二叉树的深度优先搜索,然后返回深度最小的值,可以使用递归或迭代来实现。...
分类:
其他好文 时间:
2015-10-17 23:48:57
阅读次数:
334
这道题和Minimum Depth of Binary Tree一题相似,这个是求最大深度的,就是对二叉树进行递归,然后将子树的最大深度进行返回,最终得到这个树的最大深度。...
分类:
其他好文 时间:
2015-10-17 23:48:57
阅读次数:
345