码迷,mamicode.com
首页 >  
搜索关键字:binary tree upside d    ( 23249个结果)
LeetCode: Same Tree
LeetCode: 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 struct...
分类:其他好文   时间:2014-08-28 22:40:46    阅读次数:266
Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:其他好文   时间:2014-08-28 21:01:06    阅读次数:179
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-08-28 20:57:46    阅读次数:201
Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2014-08-28 19:33:55    阅读次数:266
【算法导论学习-24】二叉树专题2:二叉搜索树(Binary Search Tree,BST)
二叉搜索树(Binary Search Tree,BST)的一点总结。...
分类:其他好文   时间:2014-08-28 14:52:59    阅读次数:215
hdoj 4925 Apple tree 【最小割】
题目:hdoj 4925 Apple tree  来源:2014 Multi-University Training Contest 6 题意:给出一个矩阵,然后每个格子中的数是2^(相邻格子的个数),然后要求不能取相邻的数,让取得数最大。 分析:就是hdoj 1569 点击打开链接 的版本,只不过数据范围增大了。不过数据水了。下来一样的效果,相同的代码可以ac。...
分类:移动开发   时间:2014-08-28 13:25:18    阅读次数:321
iMatrix平台中标签数(在tree:ztree)用法(2)
1.1.1??? 标签树<ztree:ztree> 1.1.1.1??? 用法 <ztree:ztree ????????????? treeType="MAN_DEPARTMENT_TREE" ????????????? treeId="treeDemo" ????????????? ...
分类:其他好文   时间:2014-08-28 11:43:19    阅读次数:192
LeetCode Binary Tree Postorder Traversal
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1]. 1...
分类:其他好文   时间:2014-08-28 11:12:49    阅读次数:209
UVA 11983 Weird Advertisement --线段树求矩形问题
题意:给出n个矩形,求矩形中被覆盖K次以上的面积的和。解法:整体与求矩形面积并差不多,不过在更新pushup改变len的时候,要有一层循环,来更新tree[rt].len[i],其中tree[rt].len[i]表示覆盖次数大于等于i的线段长度,以便求面积,最后只要每次都用tree[1].len[K...
分类:其他好文   时间:2014-08-28 11:08:19    阅读次数:315
【leetcode】Binary Tree Postorder Traversal
题目:...
分类:其他好文   时间:2014-08-28 09:44:59    阅读次数:165
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!