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.Fo...
分类:
其他好文 时间:
2014-11-16 07:06:02
阅读次数:
151
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total numb...
分类:
其他好文 时间:
2014-11-16 07:05:48
阅读次数:
159
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 andsum =...
分类:
其他好文 时间:
2014-11-16 07:04:58
阅读次数:
216
1.root@controller2:~#novaservice-list+----+------------------+-------------+----------+---------+-------+------------+-----------------+|Id|Binary|Host|Zone|Status|State|Updated_at|DisabledReason|+----+------------------+-------------+----------+---------+-..
分类:
系统相关 时间:
2014-11-16 01:58:12
阅读次数:
295
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:
其他好文 时间:
2014-11-16 01:52:28
阅读次数:
227
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:
其他好文 时间:
2014-11-15 23:06:45
阅读次数:
331
可能是因为我是按难度顺序刷的原因,这个其实在之前的几道题里面已经写过了。题目如下: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path...
分类:
其他好文 时间:
2014-11-15 21:31:17
阅读次数:
194
跟第七题一样,把最后的输出顺序换一下就行。。。 Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For exam...
分类:
其他好文 时间:
2014-11-15 21:29:30
阅读次数:
231
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:
其他好文 时间:
2014-11-15 18:47:58
阅读次数:
103
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:
其他好文 时间:
2014-11-15 18:47:01
阅读次数:
234