码迷,mamicode.com
首页 >  
搜索关键字:maximum    ( 4142个结果
LeetCode: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 leaf node. 解题思路:直接DFS。 代码: /**...
分类:其他好文   时间:2014-10-24 13:04:21    阅读次数:147
【LeetCode刷题Java版】Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4], the contiguous subarray [2,3] has the largest pr...
分类:编程语言   时间:2014-10-24 13:01:16    阅读次数:222
Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:其他好文   时间:2014-10-24 10:26:11    阅读次数:269
UVa 11827 - Maximum GCD
题目:给你一组数,求出其中两两最大公约数中最大的值。 分析:数论。数据较小,直接枚举即可。 说明:注意输入格式。 #include #include #include using namespace std; int data[101]; int gcd(int a, int b) { return a%b?gcd(b, a%b):b; } int main() { int...
分类:其他好文   时间:2014-10-23 16:24:39    阅读次数:348
LeetCode: Jump Game Total 解题报告
Maximum Product SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given...
分类:其他好文   时间:2014-10-22 19:51:21    阅读次数:272
Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:其他好文   时间:2014-10-22 14:29:45    阅读次数:171
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 lea...
分类:其他好文   时间:2014-10-21 22:58:39    阅读次数:235
Maximum Product Subarray 最大连续乘积子集
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:其他好文   时间:2014-10-21 22:52:27    阅读次数:278
NYOJ 119 士兵杀敌(三)(RMQ算法)
采用的的是小牛的写法,蒟蒻第一次写。。 RMQ (Range Minimum/Maximum Query)问题是指:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j 这里介绍ST算法:采用动态规划的思想:详见 士兵杀敌(三) 时间限制:2000 ms  |  内存限制:65535 KB 难度:5 描述 南将军统率着N个士兵,士兵分...
分类:编程语言   时间:2014-10-21 01:05:37    阅读次数:227
[LeetCode] Maximum Product Subarray
题目描述:Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4...
分类:其他好文   时间:2014-10-20 08:38:54    阅读次数:125
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!