码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果
Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-06-28 23:59:00    阅读次数:383
leetcode--Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.public class Solution { public String longestCommonPrefix(Str...
分类:其他好文   时间:2014-06-25 17:03:03    阅读次数:331
LeetCode: Longest Consecutive Sequence [128]
【题目】 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 consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4. Your algorithm should run...
分类:其他好文   时间:2014-06-25 07:55:42    阅读次数:244
SPOJ 1811LCS Longest Common Substring
后缀自动机裸题.... Longest Common Substring Time Limit: 2000MS   Memory Limit: Unknown   64bit IO Format: %lld & %llu [Submit]   [Go Back]   [Status]   Description A st...
分类:其他好文   时间:2014-06-24 22:15:40    阅读次数:240
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 longest palindromic substring. 方法 ...
分类:其他好文   时间:2014-06-24 19:36:55    阅读次数:212
zoj-3790-Consecutive Blocks
使用l,r指针游动。 然后使用记录游动过程中的最大值。 我离散化了一下。 #include #include #include #include #include #include using namespace std; #define maxn 110000 mapmp; struct list { int x; int get; int lose; in...
分类:其他好文   时间:2014-06-22 11:52:02    阅读次数:226
Leetcode:Longest Palindromic Substring 最长回文子串
Longest Palindromic Substring:Given a stringS, find the longest palindromic substring inS.You may assume that the maximum length ofSis 1000, and there...
分类:其他好文   时间:2014-06-21 07:36:18    阅读次数:227
Longest Common Prefix
题目 Write a function to find the longest common prefix string amongst an array of strings. 方法 从第一个字符开始,判断是否相同。 public String longestCommonPrefix(String[] strs) { if (strs ...
分类:其他好文   时间:2014-06-18 11:18:30    阅读次数:205
LeetCode: Longest Common Prefix 题解
Write a function to find the longest common prefix string amongst an array of strings.题解: 寻找一组字符串的最长公共前缀。最简单的方法,用一个字符串记录当前最长的公共前缀,然后依次比较。时间复杂度: O(N). ...
分类:其他好文   时间:2014-06-18 00:03:08    阅读次数:274
Leetcode: Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-06-17 14:35:50    阅读次数:297
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!