码迷,mamicode.com
首页 >  
搜索关键字:二叉树.binary tree    ( 18099个结果
二叉查找树(binary search tree)详解
二叉查找树(Binary Search Tree),也称二叉排序树(binary sorted tree),是指一棵空树或者具有下列性质的二叉树:若任意节点的左子树不空,则左子树上所有结点的值均小于它的根结点的值任意节点的右子树不空,则右子树上所有结点的值均大于它的根结点的值任意节点的左、右子树也分...
分类:其他好文   时间:2014-06-16 23:32:04    阅读次数:199
【Leetcode】Binary Tree Level Order Traversal II
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For example: Given binary tree {3,9,20,#,#,15,7}, ...
分类:其他好文   时间:2014-06-15 15:17:43    阅读次数:192
LeetCode:Sum Root to Leaf Numbers
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. F...
分类:其他好文   时间:2014-06-15 14:51:02    阅读次数:167
Easyui 异步树直接全部展开
初始化异步树直接全部展开代码: $(function(){ $('#tt').tree({ url:'/treeInit', lines:true, onLoadSuccess:function(node,data){ var t = $(this); if(data){ $(data).each(f...
分类:其他好文   时间:2014-06-15 13:30:02    阅读次数:242
【Leetcode】Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree {3,9,20,#,#,15,7}, 3 / 9 20 ...
分类:其他好文   时间:2014-06-15 13:26:54    阅读次数:200
数据结构快速回顾——二叉树
二叉树(Binary Tree)是个有限元素的集合,该集合或者为空、或者由一个称为根(root)的元素及两个不相交的、被分别称为左子树和右子树的二叉树组成。当集合为空时,称该二叉树为空二叉树。在二叉树中,一个元素也称作一个结点。基本概念:(1)结点的度。结点所拥有的子树的个数称为该结点的度。(2)叶...
分类:其他好文   时间:2014-06-15 11:14:30    阅读次数:255
[Leetcode] Binary Tree Maximum Path Sum
Question:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, .....
分类:其他好文   时间:2014-06-14 20:59:07    阅读次数:188
Leetcode:Binary Tree Zigzag Level Order Traversal
Description:Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next ...
分类:其他好文   时间:2014-06-14 18:41:40    阅读次数:265
[LeetCode] Flatten Binary Tree to Linked List
1 迭代,重要关系 p->right = s.top(); 1 class flat{ 2 public: 3 void flatten(TreeNode* root) { 4 if (root == NULL) return; 5 ...
分类:其他好文   时间:2014-06-14 16:50:41    阅读次数:172
leetcode -day29 Binary Tree Inorder Traversal & Restore IP Addresses
1、 ?? Binary Tree Inorder Traversal Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return ...
分类:其他好文   时间:2014-06-14 14:11:27    阅读次数:315
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!