码迷,mamicode.com
首页 >  
搜索关键字:minimum    ( 3256个结果
LeetCode OJ - Minimum && Maximum Depth of Binary Tree
这两道题用递归的解法都很简单,只是稍有不同。下面是AC代码: 1 /** 2 * Given a binary tree, find its minimum depth. 3 * the minimum depth is the number of nodes along th...
分类:其他好文   时间:2014-05-10 08:47:32    阅读次数:271
Leetcode: Minimum Depth of Binary Tree
这道题因为不仔细的缘故两次过,与Maximum Depth of Binary Tree问题类似,区别在于这个问题中,如果一个节点左子树为空、右子树有值,则该节点的深度应取决于右子树,而不能直接取min{左,右} 1 /** 2 * Definition for binary tree 3 * .....
分类:其他好文   时间:2014-05-10 01:40:13    阅读次数:293
Edit Distance
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:其他好文   时间:2014-05-10 01:09:28    阅读次数:325
Leetcode | Edit Distance
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have t...
分类:其他好文   时间:2014-05-09 19:09:35    阅读次数:318
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-08 21:08:25    阅读次数:407
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
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
C - Minimum Inversion Number
DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of ....
分类:其他好文   时间:2014-05-05 11:42:13    阅读次数:276
3256条   上一页 1 ... 323 324 325 326 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!