码迷,mamicode.com
首页 >  
搜索关键字:binary tree upside d    ( 23249个结果)
LeetCode Binary Tree Level Order Traversal II
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:其他好文   时间:2014-10-20 23:17:30    阅读次数:261
LeetCode Path Sum
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.Fo...
分类:其他好文   时间:2014-10-20 22:58:44    阅读次数:305
BZOJ 3674 可持久化并查集加强版 可持久化并查集
题目大意:同3673 强制在线 同3673 只不过慢了一些0.0 这道题只写路径压缩比只写启发式合并要快一点点 两个都写就慢的要死0.0 改代码RE的可能是内存不够 #include #include #include #include #define M 200200 using namespace std; struct Tree{ Tree *ls,*rs; int num; }...
分类:其他好文   时间:2014-10-20 19:30:35    阅读次数:164
ExtJS中给Tree节点加click事件
第一种: 直接通过TreePanel中的Config Option中的listener来添加,代码如下: var TreePan = new Ext.tree.TreePanel({ id: 'TreePan', title: "侧边栏", useArrows: true, width: 240, ...
分类:Web程序   时间:2014-10-20 14:56:30    阅读次数:280
Path Sum 路径和
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.Fo...
分类:其他好文   时间:2014-10-20 14:47:59    阅读次数:168
BZOJ 3123 SDOI2013 森林 可持久化线段树+倍增LCA+启发式合并
题目大意:给定一棵森林,每个点有权值,提供两种操作: 1.查询两点间路径上第k小的权值 2.将两个点之间连一条边 保证连接后仍是一座森林 可持久化线段树部分同Count On A Tree 只是这道题加了个连接操作 对于连接操作我们要用到启发式合并 就是把小的那棵树暴力重建 很简单的一个操作但是可以证明是均摊O(nlogn)的 大小我用了并查集 其实记录根就可以了 此外本题的多组数据是...
分类:其他好文   时间:2014-10-20 13:36:39    阅读次数:291
【LeetCode】Find Minimum in Rotated Sorted Array 解题报告
【题目】 Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. You may assume no duplicate...
分类:其他好文   时间:2014-10-20 11:51:28    阅读次数:239
Convert Sorted List to Binary Search Tree
[leetcode]Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2014-10-20 11:49:53    阅读次数:114
Path Sum
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.Fo...
分类:其他好文   时间:2014-10-20 11:21:40    阅读次数:184
ExtJS中TreeGrid的用法
如果您是第一次使用ExtJS的TreeGrid的话,我相信总会有一些小麻烦的,下面就来说一说ExtJS中TreeGrid的使用。 本人使用的ExtJS版本为4.0.7,并且使用了MVC模式,如果不了解ExtJS的MVC模式的话我个觉得还是有必要去学学的, 学完后你肯定会喜欢上的。 其实在ExtJS中并没有TreeGrid这么一个类,这个说法是从EasyUI中借用过来的,ExtJS中的Tree...
分类:Web程序   时间:2014-10-19 23:19:10    阅读次数:401
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!