码迷,mamicode.com
首页 >  
搜索关键字:binary tree level or    ( 28941个结果
UDT: Breaking the Data Transfer Bottleneck
http://udt.sourceforge.net/DT is a reliable UDP based application level data transport protocol for distributed data intensive applications over wide ...
分类:其他好文   时间:2014-05-01 13:21:54    阅读次数:488
LeetCode OJ - Binary Tree Maximum Path
这道题需要注意的地方有以下一些:1. 求从子树中的某节点到当前节点的最大路径不能采用递归方法,因为这个部分会被反复的调用,如果用递归,会使得之前已经计算过的节点被重复计算,使得时间复杂度特别高;2. 树中有节点的值是负数的。下面是AC代码。(我发现AC并不代表代码真的完全正确!!) 1 /** 2 ...
分类:其他好文   时间:2014-05-01 12:10:52    阅读次数:274
Oracle按时间段分组统计
想要按时间段分组查询,首先要了解level,connect by,oracle时间的加减.关于level这里不多说,我只写出一个查询语句:----level 是一个伪例 select level from dual connect by level d.dt-2 group by d.dt ...
分类:数据库   时间:2014-05-01 08:09:44    阅读次数:415
[ACM] POJ2352 [树状数组稍微变形]
DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level...
分类:其他好文   时间:2014-05-01 05:42:32    阅读次数:368
为树形控件添加弹出式菜单,并跟踪所选择的项
[cpp]view plaincopy为树形控件添加弹出式菜单,并跟踪所选择的项[cpp]view plaincopy动态弹出式菜单[cpp]view plaincopy//获取当前右键的位置CPointpt;GetCursorPos(&pt);m_tree.ScreenToClient(&pt);...
分类:其他好文   时间:2014-05-01 02:45:10    阅读次数:341
Pat(Advanced Level)Practice--1063(Set Similarity)
Pat1063代码 题目描述: Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is the to...
分类:其他好文   时间:2014-04-29 13:44:20    阅读次数:325
分布式消息系统Jafka入门指南之二
分布式消息系统Jafka入门指南之二作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs三、Jafka的目录结构1、安装tree命令$ sudo yum install tree2、查看目录$ tree -L 1 . ?..?? bin ?..?? conf ?..?? data ?..?? lib ?..?? LICENSE ?..?? logs ?..?...
分类:其他好文   时间:2014-04-29 13:38:21    阅读次数:448
map容器设计
在红黑树基础上设计map容器,在设计map时,可以明显利用的map模板类中KEY,VALUE,KEYOFVALUE的灵活运用 不多说,代码如下: //my_map.h #ifndef MY_MAP_H_INCLUDED #define MY_MAP_H_INCLUDED #include //for pair #include"my_rb_tree.h" using std::pair;...
分类:其他好文   时间:2014-04-29 13:27:21    阅读次数:443
CSU 1414: Query on a Tree
预处理每个结点的子结点的个数sons , 则对x的询问可由sons[x]- sigma( sons[v] ) (v是到x距离为d的点)得到 怎么快速的找到这些v呢? 注意到距离x为d的点肯定在树的同一层.... 可以对树进行dfs时记录每个结点时间戳的同时把每一层的结点保存下来,然后对每一层维护一个前缀和 如果v是x下面子结点那么v的时间戳肯定在x的范围内,这样就可以二分確定出前缀和的范围了....
分类:其他好文   时间:2014-04-28 10:34:42    阅读次数:434
hdu-3487-Play with Chain (Splay tree)
伸展树模版真的好长好长。。。 cut a b c:把第a-1个数伸展到根节点,把第b+1个数伸展到a的右子树,然后把ch[ch[root][1][0]]拿掉,放在剩下的树的第c个节点下。 flip a b:把第a-1个数伸展到根节点,把第b+1个数伸展到a的右子树,然后翻转ch[ch[root][1][0]]; 由于会出现操作两边的情况,所以加了两个-1节点。 注意: 1,输出的时候要注...
分类:其他好文   时间:2014-04-27 22:31:19    阅读次数:295
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!