码迷,mamicode.com
首页 >  
搜索关键字:palindromic    ( 595个结果
第五题:Longest Palindromic Substring
擦!leetcode题目:Longest Palindromic Substring...
分类:其他好文   时间:2015-02-12 00:50:18    阅读次数:161
leetcode[5]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-02-10 15:06:02    阅读次数:172
LeetCode 005 Longest Palindromic Substring
题目描述:Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and ...
分类:其他好文   时间:2015-02-06 23:10:27    阅读次数:133
PAT1019. General Palindromic Number
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-02-04 12:36:32    阅读次数:114
1019. General Palindromic Number
1019. General Palindromic Number (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA number that will be the same when it is written forwa...
分类:其他好文   时间:2015-02-03 21:16:09    阅读次数:211
【leetcode】Longest Palindromic Substring (middle) 经典
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-02-03 21:02:01    阅读次数:155
Longest Palindromic Substring
求解回文字符串:这道题是查找资料才得到的解法。具体思路如下:比如对字符串abcba,做如下处理#a#b#c#b#a#,目的是消除偶数的回文。计算一点的回文长度时,根据保存的前端的最大回文长度和中心点,判断当前点应该是从0开始计算,还是可以根据利用以前的结果。主要就是这个思路。class Soluti...
分类:其他好文   时间:2015-02-01 13:27:48    阅读次数:173
Leetcode#5 Longest Palindromic Substring
原题地址最初的想法是用动态规划,令palin[i][j]表示s[i..j]是否是回文串,则有递推公式palin[i][j] = s[i] == s[j] && palin[i+1][j-1]。因为递推式只使用相邻层的值,所以编码的时候可以将二维状态数组压缩成一维的。代码: 1 string long...
分类:其他好文   时间:2015-01-30 17:03:05    阅读次数:105
General Palindromic Number (进制)
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-28 14:24:46    阅读次数:110
LeetCode --- 5. Longest Palindromic Substring
题目链接: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 ...
分类:其他好文   时间:2015-01-27 23:35:02    阅读次数:144
595条   上一页 1 ... 47 48 49 50 51 ... 60 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!