题目描述: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 identic...
分类:
编程语言 时间:
2015-12-23 16:09:44
阅读次数:
292
Question:Given a binary tree, find all paths that sum of the nodes in the path equals to a given numbertarget.A valid path is from root node to any of...
分类:
其他好文 时间:
2015-12-23 10:43:18
阅读次数:
130
Binary Tree TraversalsProblem DescriptionA binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binar...
分类:
其他好文 时间:
2015-12-22 21:13:24
阅读次数:
235
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 binary tree and sum
...
分类:
其他好文 时间:
2015-12-22 13:17:54
阅读次数:
136
Given a binary tree, count the number of uni-value subtrees.A Uni-value subtree means all nodes of the subtree have the same value.For example:Given b...
分类:
其他好文 时间:
2015-12-22 07:54:37
阅读次数:
211
题目:Given a binary tree, return thevertical ordertraversal of its nodes' values. (ie, from top to bottom, column by column).If two nodes are in the sam...
分类:
其他好文 时间:
2015-12-22 06:31:23
阅读次数:
193
STL之二分查找 (Binary search in STL)Section I正确区分不同的查找算法count,find,binary_search,lower_bound,upper_bound,equal_range本文是对Effective STL第45条的一个总结,阐述了各种查找算法的异同...
分类:
其他好文 时间:
2015-12-21 20:08:10
阅读次数:
306
这一章我们研究四种主要的数据结构: linked lists, queues, maps, binary trees.Linked Lists:() 在linux中,并不是直接将某个结构体作为链表的节点,而是在该结构中插入一个链表的节点。借助container_of()这个宏,我们可以轻松的找...
分类:
其他好文 时间:
2015-12-21 01:57:09
阅读次数:
124
题目描述:(链接)Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3...
分类:
其他好文 时间:
2015-12-20 12:57:00
阅读次数:
149
89. Gray CodeTotal Accepted:49119Total Submissions:142633Difficulty:MediumThe gray code is a binary numeral system where two successive values differ ...
分类:
其他好文 时间:
2015-12-20 11:36:58
阅读次数:
128