码迷,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...
分类:其他好文   时间:2015-09-07 22:51:12    阅读次数:227
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-07 22:50:00    阅读次数:213
PAT-ADVANCED-1096-Consecutive Factors
Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, a...
分类:其他好文   时间:2015-09-07 10:45:31    阅读次数:145
LeetCode(5) : Longest Palindromic Substring
【题目】LeetCode(5): Longest Palindromic SubstringURL: https://leetcode.com/problems/longest-palindromic-substring/【描述】Given a stringS, find the longest p...
分类:其他好文   时间:2015-09-07 07:02:02    阅读次数:339
[LeetCode] Longest Substring with At Most Two Distinct Characters
Longest Substring with At Most Two Distinct CharactersGiven a string, find the length of the longest substring T that contains at most 2 distinct char...
分类:其他好文   时间:2015-09-06 12:38:14    阅读次数:178
leetcode - 14:Longest Common Prefix
找最长公共前缀,Longest Common Prefix,自己写的小算法,并吸取他人的精华进行改进,直接上代码,第一次写难免会有疏漏,还望大家指正 #include<iostream> #include<string> #include<vector> using?namespace...
分类:其他好文   时间:2015-09-05 18:01:36    阅读次数:153
Longest Substring Without Repeating Characters
1 class Solution { 2 public: 3 4 int lengthOfLongestSubstring(string s) { 5 // for ASCII char sequence, use this as a hashmap 6 vector...
分类:其他好文   时间:2015-09-05 12:17:57    阅读次数:127
usaco Longest Prefix
题意是给出一些子串,用这些子串能拼出一个S的前缀来,问这个前缀最长能有多长。做法是,从S的第一个元素开始扫,到S[i]时,查看每一个长度不大于i的子串,然后检查这个子串能否和以i为结尾,长度与这个子串长度相同的S的子串匹配,若能匹配,则检查在以S[i-子串长度] 为结尾处能否找到以前匹配到S[i-子...
分类:其他好文   时间:2015-09-04 17:00:46    阅读次数:203
Codeforces Gym 100114 H. Milestones 离线树状数组
H. MilestonesTime Limit: 1 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100114DescriptionThe longest road of the Fairy Kingdom has n milestone...
分类:编程语言   时间:2015-09-03 20:19:57    阅读次数:186
leetcode&编程之美——博文目录
leetcode刷题整理:1——Two Sum(哈希表hashtable,map)2——Add Two Numbers(链表)3——Longest Substring Without Repeating Characters(set,哈希表,两个指针)9——Palindrome Number (数学...
分类:其他好文   时间:2015-09-03 20:18:49    阅读次数:190
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!