描述:
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.
思路:
刚开始非常天...
分类:
其他好文 时间:
2015-01-27 20:21:30
阅读次数:
205
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.(最长回文子串)
中心扩展法:
pub...
分类:
其他好文 时间:
2015-01-27 18:31:08
阅读次数:
151
题目: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.
下面是英文,祝你好运
...
分类:
其他好文 时间:
2015-01-27 16:35:09
阅读次数:
363
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.
#include
#includ...
分类:
其他好文 时间:
2015-01-27 15:02:38
阅读次数:
164
Largest palindrome product
Problem 4
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest p...
分类:
编程语言 时间:
2015-01-27 09:34:40
阅读次数:
223
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-25 11:03:14
阅读次数:
129
原题地址以前可以用DP枚举所有回文串,但是Leetcode后来增加了几组大数据,用DP会超时。什么!用DP都超时了??那怎么办?答:二分法尝试可能的回文串长度,直到找到最大值需要注意的是,假设现在已经验证了长度为length的回文串不存在,传统的二分法就会去尝试长度为length/2的回文串是否存在...
分类:
其他好文 时间:
2015-01-24 19:57:26
阅读次数:
127
https://oj.leetcode.com/problems/longest-palindromic-substring/Given a stringS, find the longest palindromic substring inS. You may assume that the ma...
分类:
其他好文 时间:
2015-01-22 17:24:11
阅读次数:
105
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number...
分类:
其他好文 时间:
2015-01-22 08:16:14
阅读次数:
238
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 longes...
分类:
其他好文 时间:
2015-01-22 00:10:52
阅读次数:
142