码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
Balanced Binary Tree
Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tre...
分类:其他好文   时间:2014-10-22 12:29:07    阅读次数:171
Path Sum II 二叉树路径之和之二
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-10-22 07:36:22    阅读次数:218
平衡树
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:其他好文   时间:2014-10-22 01:06:01    阅读次数:162
Populating Next Right Pointers in Each Node 设置二叉树的next节点
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2014-10-21 23:05:01    阅读次数:223
Same Tree 比较两个二叉树是否完全相同
Given two binarytrees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and...
分类:其他好文   时间:2014-10-21 23:02:04    阅读次数:240
Maximum Depth of Binary Tree 二叉树的深度
Given a binary tree,find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest lea...
分类:其他好文   时间:2014-10-21 22:58:39    阅读次数:235
Binary Tree Inorder/Preorder Traversal 返回中序和前序/遍历二叉树的元素集合
给定一个二叉树,以集合方式返回其中序/先序方式遍历的所有元素。有两种方法,一种是经典的中序/先序方式的经典递归方式,另一种可以结合栈来实现非递归Given a binary tree, return theinordertraversal of its nodes' values.For examp...
分类:其他好文   时间:2014-10-21 22:49:08    阅读次数:269
Unique Binary Search Tree II | LeetCode
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:其他好文   时间:2014-10-21 22:48:09    阅读次数:266
Minimum Depth of Binary Tree
Minimum Depth of Binary Tree...
分类:其他好文   时间:2014-10-21 21:29:04    阅读次数:170
LeetCode: Populating Next Right Pointers in Each Node 解题报告
Populating Next Right Pointers in Each Node TotalGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next...
分类:其他好文   时间:2014-10-21 21:06:24    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!