码迷,mamicode.com
首页 >  
搜索关键字:d. gukiz and binary    ( 11754个结果
[leetcode]Path Sum II
Path Sum IIGiven 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 tr...
分类:其他好文   时间:2014-07-31 23:17:10    阅读次数:175
[leetcode]Same Tree
Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ide...
分类:其他好文   时间:2014-07-31 23:15:00    阅读次数:201
[leetcode]Recover Binary Search Tree
Recover Binary Search TreeTwo elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A sol...
分类:其他好文   时间:2014-07-31 23:13:00    阅读次数:223
[leetcode]Validate Binary Search Tree
Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtre...
分类:其他好文   时间:2014-07-31 23:11:40    阅读次数:225
Balanced Binary Tree(Java代码没过,什么原因???)
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-07-31 20:55:47    阅读次数:197
hdu 1701 (Binary Tree Traversals)(二叉树前序中序推后序)
Binary Tree Traversals Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescript...
分类:其他好文   时间:2014-07-31 20:43:07    阅读次数:218
[LeetCode 题解]: Validate Binary Search Tree
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-07-31 16:08:26    阅读次数:283
HDU 1710 Binary Tree Traversals(二叉树)
题目地址:HDU 1710 已知二叉树先序和中序求后序。 #include #include int a[1001], cnt; typedef struct node { int date ; node *lchild , *rchild ; }*tree; int getk(int ch,int ino[],int is,int n) { for(int i =...
分类:其他好文   时间:2014-07-31 13:25:46    阅读次数:225
Binary Tree Preorder Traversal
二叉树的前序遍历递归实现/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : v...
分类:其他好文   时间:2014-07-31 12:44:46    阅读次数:188
Binary Tree Postorder Traversal
二叉树的后序遍历递归实现/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : v...
分类:其他好文   时间:2014-07-31 12:30:16    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!