码迷,mamicode.com
首页 >  
搜索关键字:palindromic    ( 595个结果
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...
分类:其他好文   时间:2014-06-28 23:59:00    阅读次数:383
Leetcode: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 there...
分类:其他好文   时间:2014-06-21 07:36:18    阅读次数:227
Manacher算法--O(n)内求回文子串
昨天做了leetcode里的     Longest Palindromic Substring ,一开始用动态规划O(N^2),不管怎么改都超时了。。。于是在大神的帮助下,找到了传说中的Manacher算法,居然能在O(n)内求出来,瞬间给跪了。 本屌认为,这个算法主要是充分的利用了以前的匹配的结果,来起到了降低时间复杂度的作用,这点跟KMP算是有点类似。在预处理时有个小技巧就是将第0,1为设...
分类:其他好文   时间:2014-06-20 12:15:22    阅读次数:305
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...
分类:其他好文   时间:2014-06-17 14:35:50    阅读次数:297
[LeetCode] Longest Palindromic Substring [14]
最长回文字串,相信做过Palindrome Partitioning II 这个题的同学应该可以很快做出来。没错,这个题还可以使用动态规划方法得到一个时间复杂度为O(n^2)的解法,当然如果你想要更好的时间复杂度的算法也是有的。好的,我们先来看看时间复杂度为O(n^2)的算法。 代码实现--动态规划O(n^2) 相信如果你在网上看过了别人的算法,你会发现我的算法是最简洁的。哈哈,这个题需要注意的是如果你用惯了vector的话,你这里肯定会得到超时的提示... ...代码二--复杂度为O(n)的算法...
分类:其他好文   时间:2014-06-07 12:08:43    阅读次数:224
projecteuler---->problem=4----Largest palindrome product
title: 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 l...
分类:其他好文   时间:2014-06-07 01:24:27    阅读次数:398
Leetcode: Longest Palindromic Substring. java
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...
分类:编程语言   时间:2014-06-02 09:22:03    阅读次数:328
【leetcode】Longest Palindromic Substring
题目:给定个字符串,返回chuan...
分类:其他好文   时间:2014-05-31 21:13:29    阅读次数:325
LightOJ-1205 - Palindromic Numbers
A palindromic number or numeral palindrome is a 'symmetrical' number like 16461 that remains the same when its digits are reversed. In this problem you will be given two integers i j, you have to find...
分类:其他好文   时间:2014-05-25 07:41:08    阅读次数:253
欧拉项目004:寻找最大的回文数
Problem 4: Largest palindrome product 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 pal...
分类:其他好文   时间:2014-05-22 18:48:46    阅读次数:355
595条   上一页 1 ... 57 58 59 60 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!