码迷,mamicode.com
首页 >  
搜索关键字:maximum subsequence    ( 5146个结果
leetcode: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 longes...
分类:其他好文   时间:2014-05-24 04:45:39    阅读次数:245
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 le...
分类:其他好文   时间:2014-05-23 11:54:10    阅读次数:317
Algorithm for Maximum Subsequence Sum z
MSS(Array[],N)//Where N is the number of elements in array{sum=0; //current summax-sum=0;//Maximum Sumseq-start=0;//start of the subsequenceseq-end=0;...
分类:其他好文   时间:2014-05-23 11:03:58    阅读次数:221
46. 对称子字符串的最大长度(ToDo)
Suffix Tree to get maximum symmetrical sub-string.
分类:其他好文   时间:2014-05-23 04:21:13    阅读次数:237
【动态规划初级】longest increasing subsequence
一个序列有N个数:A[1],A[2],A[3]……A[N],求最长非降子序列的长度。最重要的是要找出所谓的“状态”,本题目中是d[i],初始化最长长度为自己本身即一个单位长度。看是否要加入第i个元素,如果第i个元素a[i]比当前序列的最后一个元素a[j]大的话,那么加入,同时d[i]=d[j]+1;...
分类:其他好文   时间:2014-05-22 05:54:06    阅读次数:228
3.子数组的最大和
Maximum continuous sub-array.
分类:其他好文   时间:2014-05-22 04:36:26    阅读次数:232
Best Time to Buy and Sell Stock III
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-21 17:27:55    阅读次数:252
算法——动态规划篇——最长公共子序列
问题描述      最长公共子序列,英文缩写为LCS(Longest Common Subsequence)。其定义是,一个序列 S ,如果分别是两个或多个已知序列的子序列,且是所有符合此条件序列中最长的,则 S 称为已知序列的最长公共子序列。       解决最长公共子序列,一种常用的办法,就是穷举法,组合出所有的情况,但是这样对于长序列的情况来说,是非常不实际。。 假设现在有...
分类:其他好文   时间:2014-05-21 13:55:35    阅读次数:260
POJ 1458 Common Subsequence.(最长公共子序列)
Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there exists a ...
分类:其他好文   时间:2014-05-21 10:58:39    阅读次数:237
求树的最大路径和
求树的最大路径和(Binary Tree Maximum Path Sum)...
分类:其他好文   时间:2014-05-18 18:25:41    阅读次数:235
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!