Maximal SquareTotal Accepted:6373Total Submissions:31927My SubmissionsQuestionSolutionGiven a 2D binary matrix filled with 0's and 1's, find the large...
分类:
其他好文 时间:
2015-07-10 11:00:27
阅读次数:
99
Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below bina...
分类:
其他好文 时间:
2015-07-10 09:36:28
阅读次数:
113
http://acm.hdu.edu.cn/showproblem.php?pid=1710Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Tot...
分类:
其他好文 时间:
2015-07-10 02:13:21
阅读次数:
247
??
Symmetric Tree Total Accepted:
61440 Total Submissions:
194643
My Submissions
Given a binary tree, check whether it is a mirror of itself (ie, symmetric ar...
分类:
其他好文 时间:
2015-07-10 00:29:44
阅读次数:
157
题意:如题思路:递归解决,同判断对称树的原理差不多。先保证当前两个结点是相等的,再递归保证两左结点是相等的,再递归保证右结点是相等的。 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int ...
分类:
其他好文 时间:
2015-07-10 00:08:15
阅读次数:
243
二叉查找树(Binary Search Tree),也称有序二叉树(ordered binary tree),排序二叉树(sorted binary tree),是指一棵空树或者具有下列性质的二叉树:1. 若任意节点的左子树不空,则左子树上所有结点的值均小于它的根结点的值;2. 若任意节点的右子树不...
分类:
编程语言 时间:
2015-07-10 00:07:29
阅读次数:
230
RPM是RedHatPackageManager(RedHat软件包管理工具)类似Windows里面的“添加/删除程序”rpm执行安装包二进制包(Binary)以及源代码包(Source)两种。二进制包可以直接安装在计算机中,而源代码包将会由RPM自动编译、安装。源代码包经常以src.rpm作为后缀名。常用命令组合:..
分类:
系统相关 时间:
2015-07-09 22:49:11
阅读次数:
317
题目:
Given a complete binary tree, count the number of nodes.
Definition of a complete binary tree from Wikipedia:
In a complete binary tree every level, except possibly the last, is completel...
分类:
编程语言 时间:
2015-07-09 22:42:58
阅读次数:
266
Remove Node in Binary Search TreeGiven a root of Binary Search Tree with unique value for each node. Remove the node with given value. If there is no ...
分类:
其他好文 时间:
2015-07-09 22:39:36
阅读次数:
156
Count Complete Tree NodesGiven acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary...
分类:
其他好文 时间:
2015-07-09 19:33:00
阅读次数:
92