码迷,mamicode.com
首页 >  
搜索关键字:maximum    ( 4142个结果
[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 a...
分类:其他好文   时间:2015-07-30 18:36:07    阅读次数:107
leetcode Ch6-Data Structure
1.Sliding Window Maximum 1 class Solution { 2 public: 3 vector maxSlidingWindow(vector &nums, int k) { 4 deque dq; 5 vector res; 6...
分类:其他好文   时间:2015-07-30 18:27:08    阅读次数:96
【转】RMQ-ST算法详解
地址:http://blog.csdn.net/z287438743z/article/details/8132806RMQ(Range Minimum/Maximum Query)问题就是求区间最值问题。这里要仔细分析的是ST算法,它可以做到O(nlogn)的预处理,O(1)回答每个询问。网上看了...
分类:编程语言   时间:2015-07-30 11:10:53    阅读次数:155
ACM寻找连续的数的乘积最大值
Given a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value of the maximum positive product involving consecutive te...
分类:其他好文   时间:2015-07-30 10:59:44    阅读次数:146
LeetCode 5_Longest Palindromic Substring
LeetCode 5_Longest Palindromic Substring  题目描述: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique ...
分类:其他好文   时间:2015-07-29 15:57:00    阅读次数:131
【LeetCode-面试算法经典-Java实现】【053-Maximum Subarray(最大子数组和)】
【053-Maximum Subarray(最大子数组和)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Find the contiguous subarray within an array (containing at least one number) which has the largest sum.   For example, given the ar...
分类:编程语言   时间:2015-07-29 07:55:12    阅读次数:131
LeetCode Maximum Product Subarray(枚举)
LeetCode Maximum Product SubarrayDescriptionGiven a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value o...
分类:其他好文   时间:2015-07-28 22:54:07    阅读次数:195
Maximum Depth of Binary Tree
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x...
分类:其他好文   时间:2015-07-28 17:59:29    阅读次数:96
LeetCode#5 Longest Palindromic Substring
Problem Definition:Given a string S, find the longest palindromic substring in S.You may assume that the maximum length of S is 1000, and there exists...
分类:其他好文   时间:2015-07-28 17:22:12    阅读次数:111
uva11059 Maximum Product
题目描述: 求连续子序列,使乘积最大 解题思路:暴力枚举,枚举所有可能的序列 #include #define MAXN 20 using namespace std; int d[MAXN]; int main() { int t=0; int n; while(scanf("%d",&n)==1) { t++; ...
分类:其他好文   时间:2015-07-28 10:47:40    阅读次数:111
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!