码迷,mamicode.com
首页 >  
搜索关键字:palindromic    ( 595个结果
USACO Palindromic Squares 【STL__string_的应用】
题目意思很简单啦,就是找回文使用string可以高速A过Source code:/*ID: wushuai2PROG: palsquareLANG: C++*///#pragma comment(linker, "/STACK:16777216") //for c++ Compiler#includ...
分类:其他好文   时间:2015-01-20 21:45:29    阅读次数:128
[C++]LeetCode: 99 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 substring. 思路:题目要求的s的一个最长回...
分类:编程语言   时间:2015-01-15 23:54:08    阅读次数:207
LeetCode No.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-01-14 16:44:41    阅读次数:109
good-article.3--------Longest Palindromic Substring Part II
Given a string S, find the longest palindromic substring in S. Note: This is Part II of the article: Longest Palindromic Substring. Here, we describe an algorithm (Manacher’s algorithm) which...
分类:其他好文   时间:2015-01-14 15:40:50    阅读次数:326
good-article.2--------Longest Palindromic Substring Part I
This interesting problem has been featured in the famous Greplin programming challenge, and is asked quite often in the interviews. Why? Because this problem can be attacked in so many ways. There a...
分类:其他好文   时间:2015-01-14 15:40:39    阅读次数:291
leetcode5 Longest Palindromic Substring
求一个字符串的最长回文子串。回文子串分为两种,一种是aba型的,一种是abba型的,因此两种情况都有考虑到。用一个循环,对字符串中的每一个字符作为中心进行判断,并记录下每个循环后的最长子串。时间复杂度为O(n*n) 之前写了一个程序可以运行,但是在leetcode中运行超时了。下面的是修改别人的程序,很精简。 {CSDN:CODE:578916}...
分类:其他好文   时间:2015-01-13 17:53:08    阅读次数:166
[LeetCode][Python]Longest Palindromic Substring
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'https://oj.leetcode.com/problems/longest-palindromic-substring/Given a string S, find the ...
分类:编程语言   时间:2015-01-13 01:21:57    阅读次数:285
[Leetcode] 5 - Longest Palindromic Substring
题目链接: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
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-01-06 23:07:00    阅读次数:208
LeetCode Longest Palindromic Substring
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
595条   上一页 1 ... 49 50 51 52 53 ... 60 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!