码迷,mamicode.com
首页 >  
搜索关键字:minimum span tree    ( 79922个结果
POJ 2468 Apple Tree 树上瞎搞分组背包
昨晚Debug了好久始终找不出哪里错了,今早再一看发现自己已荣升逗比Beta 2.0 Version. 个人感觉此题为HDU 4003 的弱化版。 把每棵子树都看成一类商品,在每类商品中至多选一件。则问题转化为最基本的分组背包问题。 dp[s][c][k] c == 1时,表示在s结点不返回时走K的最大收益,c == 0时,表示在s结点重新返回时走k步的最大收益。 可以dfs从底到顶更新d...
分类:移动开发   时间:2014-05-07 04:52:22    阅读次数:500
【LeetCode】Binary Tree Preorder Traversal
题目 Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,2,3]. Note: Recursiv...
分类:其他好文   时间:2014-05-07 03:30:19    阅读次数:254
Leetcode | Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:其他好文   时间:2014-05-07 02:55:24    阅读次数:377
hadoop yarn running beyond physical memory used
老是报物理内存越界,kill container,然后把yarn.scheduler.minimum-allocation-mb设成2048就好了跟这个yarn.nodemanager.pmem-check-enabled参数应该也有关系在这篇文章中得到启发:http://bise.aliapp.c...
分类:其他好文   时间:2014-05-07 02:15:35    阅读次数:409
红黑树(一)之 原理和算法
R-B Tree简介 Red-Black Tree,是一种特殊的二叉查找树。红黑树的每个节点上都有存储位表示节点的颜色,即红(Red)或黑(Black)。红黑树的特性:(1)每个节点是黑或红。(2)根节点是黑色。(3)每个叶子节点(NIL)是黑色。[注意:这里叶子节点,是指为空(NIL或NULL)....
分类:其他好文   时间:2014-05-07 01:53:34    阅读次数:570
Leetcode | Populating Next Right Pointers in Each Node I & II
Populating Next Right Pointers in Each Node IGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLin...
分类:其他好文   时间:2014-05-07 01:34:51    阅读次数:407
Unique MST
Unique MSTTime Limit: 3000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others)Given a connected undirected graph, tell if its minimum span....
分类:其他好文   时间:2014-05-07 00:55:18    阅读次数:530
【线段树】HDU 1394 Minimum Inversion Number
minimum inversion number:最小逆序数Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(...
分类:其他好文   时间:2014-05-07 00:43:39    阅读次数:469
leetcode -day9 Candy & Gas Station & Binary Tree Maximum Path Sum
1、 ?? Candy There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must h...
分类:其他好文   时间:2014-05-06 22:41:02    阅读次数:427
how many does the factorial of n have zero?
n! 末尾有多少个 0 个人信息:就读于燕大本科软件工程专业 目前大三; 本人博客:google搜索“cqs_2012”即可; 个人爱好:酷爱数据结构和算法,希望将来从事算法工作为人民作出自己的贡献; 博客内容:travel the binary tree by level 5 ( from down to top and from left to right ever...
分类:其他好文   时间:2014-05-06 21:19:02    阅读次数:554
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!