码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果)
Longest Substring Without Repeating Characters
题目: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lette....
分类:其他好文   时间:2015-10-02 06:35:32    阅读次数:197
LeetCode #5 Longest Palindromic Substring (M)
[Problem]Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique l...
分类:其他好文   时间:2015-10-02 00:11:38    阅读次数:194
Leetcode003---Longest Substring Without Repeating Characters0
Description:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeatin...
分类:其他好文   时间:2015-09-30 00:56:24    阅读次数:145
Longest Palindromic Substring
1:回文有两种方式,第一种是中间那个字符有奇数个,第二种是中间的字符有偶数个,对于每个字符,从这个字符开始,begin递减,end递增,判断s[begin]和s[end]是否相等,返回相等的子串。 2:遍历字符串中每个字符...
分类:其他好文   时间:2015-09-29 23:43:03    阅读次数:371
第11章:最长公共子序列(LCS:Longest Common Subsequence)
方法:动态规划 《算法导论》P208最优子结构 +重叠子问题设xi,yi,为前i个数(前缀)设c[i,j]为xi,yi的LCS的长度c[i,j] = 0 (i ==0 || j == 0)c[i,j] = a[i-1,j-1] + 1 (i,j>0 &&xi=yi)c[i,j] = max(c[i,...
分类:其他好文   时间:2015-09-26 23:56:22    阅读次数:213
LeetCode -- Longest Valid Parentheses
LeetCode -- Longest Valid Parentheses...
分类:其他好文   时间:2015-09-25 13:20:58    阅读次数:109
Maximum Depth of Binary Tree 解答
QuestionGiven 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 far...
分类:其他好文   时间:2015-09-24 10:56:30    阅读次数:128
最长递增子序列(LIS)
题目描述求一个一维数组arr[i]中的最长递增子序列的长度,如在序列1,-1,2,-3,4,-5,6,-7中,最长递增子序列长度为4,可以是1,2,4,6,也可以是-1,2,4,6。题目分析最长递增子序列(Longest Increasing Subsequence)又叫做最长上升子序列;子序列,正...
分类:其他好文   时间:2015-09-21 19:32:41    阅读次数:145
Longest Consecutive Sequence——Leetcode
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:其他好文   时间:2015-09-20 22:03:04    阅读次数:109
[LeetCode]3. Longest Substring Without Repeating Characters寻找最长无重复字符的子串
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:其他好文   时间:2015-09-20 17:40:40    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!