码迷,mamicode.com
首页 >  
搜索关键字:minimal ratio tree    ( 19189个结果
【leetcode】Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2014-07-22 23:16:35    阅读次数:373
UVALive 6577 Binary Tree 二叉树的LRU串
今天继续攒人品。。。真开心啊O(∩_∩)O~~各种身体不舒服~~https://icpcarchive.ecs.baylor.edu/external/65/6577.pdf题意是这样的,现在有一个向下无限延伸的二叉树。然后输入起点(通过只含LRU的字符串S,从根结点开始执行)。LRU分别表示往左儿...
分类:其他好文   时间:2014-07-22 23:15:54    阅读次数:550
[leetcode]Binary Tree Maximum Path Sum
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:其他好文   时间:2014-07-22 23:07:34    阅读次数:312
Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2014-07-22 23:07:13    阅读次数:379
BST(Binary Search Tree)
Definition: see wikihttp://en.wikipedia.org/wiki/Binary_search_tree 1 /* 2 This look up is a fast operation because you eliminate the half 3 t...
分类:其他好文   时间:2014-07-22 23:06:34    阅读次数:330
[leetcode] Balanced Binary Tree
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...
分类:其他好文   时间:2014-05-01 14:38:39    阅读次数:454
PGM学习之六 从有向无环图(DAG)到贝叶斯网络(Bayesian Networks)
本文的目的是记录一些在学习贝叶斯网络(Bayesian Networks)过程中遇到的基本问题。主要包括有向无环图(DAG),I-Maps,分解(Factorization),有向分割(d-Separation),最小I-Maps(Minimal I-Maps)等。主要参考Nir Friedman的...
分类:Web程序   时间:2014-04-29 10:32:45    阅读次数:449
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
福州大学第十一届程序设计竞赛
福州大学第十一届程序设计竞赛 Contest Finished! Tag Pro.ID Problem Title Ratio(AC/Submit) 1 大王叫我来巡山呐 80.31%(261/325) 2 防守阵地 I 23.48%(193/822) 3 shadow 13.23%(97/733) 4 ...
分类:其他好文   时间:2014-04-27 21:21:59    阅读次数:300
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!