Substring
时间限制:1000 ms | 内存限制:65535 KB
描述
You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substring of i...
分类:
其他好文 时间:
2015-03-18 14:11:43
阅读次数:
118
题目意思:
http://acm.nyist.net/JudgeOnline/problem.php?pid=308
给定一个字符串s,求出s与其逆序串的最长连续字串。刚开始看成求最长回文字串的问题了,Wa~!这英语我也是醉了。。。喵分析:
将s逆转为ss,求s和ss的最长连续子序列即可。if(s[i-1]==ss[j-1]) dp[i][j]=dp[i-1][j-1]+1;AC代码:/**...
分类:
其他好文 时间:
2015-03-17 23:44:13
阅读次数:
187
题目Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:
其他好文 时间:
2015-03-17 18:04:49
阅读次数:
134
problem:
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length...
分类:
编程语言 时间:
2015-03-16 16:25:54
阅读次数:
155
标题:Palindrome Partitioning通过率:26.3%难度:中等Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible pali...
分类:
其他好文 时间:
2015-03-16 16:07:04
阅读次数:
121
网址来源:http://www.cnblogs.com/hema/archive/2009/10/21/1587560.htmlsubstr方法返回一个从指定位置开始的指定长度的子字符串。stringvar.substr(start[,length])参数stringvar必选项。要提取子字符串的字...
分类:
Web程序 时间:
2015-03-16 14:29:28
阅读次数:
133
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBA...
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-03-15 13:43:07
阅读次数:
134
??
1.3- Longest Substring Without Repeating Characters
Given a string,find the length of the longest substring without repeating characters. Forexample, the longest substring without repeating l...
分类:
其他好文 时间:
2015-03-14 18:40:32
阅读次数:
123
题目地址:https://leetcode.com/problems/longest-valid-parentheses/Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.
For “(...
分类:
其他好文 时间:
2015-03-14 16:55:18
阅读次数:
188