码迷,mamicode.com
首页 >  
搜索关键字:palindromic    ( 595个结果
Longest Palindromic Substring
Longest Palindromic Substring问题:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and th...
分类:其他好文   时间:2015-04-03 17:06:38    阅读次数:112
Longest Palindromic Substring--LeetCode
题目: 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-04-01 09:30:28    阅读次数:115
[Leetcode] 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-03-30 22:49:58    阅读次数:162
LeetCode Algorithm 05
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-03-22 00:18:36    阅读次数:134
LeetCode – Refresh – Longest Palindromic Substring
O(n2): 1 class Solution { 2 public: 3 string getP(string s, int start, int end) { 4 while (start >= 0 && end result.size()) result = s1;1...
分类:其他好文   时间:2015-03-20 08:05:24    阅读次数:123
A1019. General Palindromic Number (20)
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-03-18 20:27:57    阅读次数:131
LeetCode——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-03-11 21:29:40    阅读次数:112
[数位dp+二分] zoj Generalized Palindromic Number
题意: 找一个小于N的最大的且符合题意的数。 题意的数为,通过缩减后是回文的数,所谓的缩减就是相同连续的数看做一个数,如“155451111”其实就是“15451”是符合题意的数。 思路: 通过数位dp,然后二分求解。 dp[i][j][k]代表第i位,已经放了j个数,最后长度是k的缩减回文数有几个。 然后需要一个ok[]数组代表放的数是什么,如果连续放相同的数就等于没放数。 遍历所...
分类:其他好文   时间:2015-03-11 19:45:12    阅读次数:140
LeetCode(4) || Longest Palindromic Substring 与 Manacher 线性算法
LeetCode(4) || Longest Palindromic Substring 与 Manacher 线性算法题记本文是LeetCode题库的第五题,没想到做这些题的速度会这么慢,工作之余全部耗在这上面了,只怪自己基础差。本文主要介绍使用Manacher线性算法来求解字符串的最长回文子字符...
分类:编程语言   时间:2015-03-10 23:02:35    阅读次数:203
USACO Section1.2 Palindromic Squares 解题报告
palsquare解题报告—— icedream61 博客园(转载请注明出处)----------------------------------------------------------------------------------------------------------...
分类:其他好文   时间:2015-03-09 00:19:14    阅读次数:201
595条   上一页 1 ... 45 46 47 48 49 ... 60 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!