题目链接:https://oj.leetcode.com/problems/longest-palindromic-substring/
这道题通常可以写出来的是2种做法。
1. 保持一个index从前往后扫,每次index的循环中,保持left和right的index向两边扫,但是有2种情况,aba和abba。left和right的扫描要扫2次
2. DP做法,2维矩阵
* 可以...
分类:
其他好文 时间:
2015-01-07 15:00:44
阅读次数:
128
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-01-06 23:07:00
阅读次数:
208
Longest Palindromic Substring
Question
Solution
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...
分类:
其他好文 时间:
2015-01-03 00:57:31
阅读次数:
272
https://oj.leetcode.com/problems/longest-palindromic-substring/http://fisherlei.blogspot.com/2012/12/leetcode-longest-palindromic-substring.htmlpublicclassSolution{
publicStringlongestPalindrome(Strings){
//SolutionA:
returnlongestPalindrome_Center(s);
}
..
分类:
其他好文 时间:
2015-01-02 16:15:08
阅读次数:
122
LeetCode: Palindrome 回文相关题目汇总LeetCode: Palindrome Partitioning 解题报告LeetCode: Palindrome Partitioning II 解题报告Leetcode:【DP】Longest Palindromic Substring...
分类:
其他好文 时间:
2014-12-30 20:37:58
阅读次数:
149
The problem: (The code of dynamic programming is very concise and elegant. You must learn it!)Given a stringS, find the longest palindromic substring ...
分类:
其他好文 时间:
2014-12-30 13:16:09
阅读次数:
171
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-12-28 23:38:24
阅读次数:
271
Longest Palindromic Substring-- HARD 级别Question SolutionGiven a string S, find the longest palindromic substring in S. You may assume that the maximum...
分类:
其他好文 时间:
2014-12-27 20:12:16
阅读次数:
136
Substring
时间限制:1000 ms | 内存限制:65535 KB
难度:1
描述
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 substrin...
分类:
其他好文 时间:
2014-12-26 14:40:43
阅读次数:
236
题目:(String)Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique...
分类:
其他好文 时间:
2014-12-25 06:34:06
阅读次数:
198