E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
palindrome
Palindrome
Pairs
Givenalistofuniquewords.Findallpairsofdistinctindices(i,j)inthegivenlist,sothattheconcatenationofthetwowords,i.e.words[i]+words[j]isa
palindrome
.Example1
cmershen
·
2016-05-31 23:00
Shortest
Palindrome
题目原文:GivenastringS,youareallowedtoconvertittoa
palindrome
byaddingcharactersinfrontofit.Findandreturntheshortest
palindrome
youcanfindbyperformingthistransformation.Forexample
cmershen
·
2016-05-31 23:00
Palindrome
Partitioning II
题目原文:Givenastrings,partitionssuchthateverysubstringofthepartitionisa
palindrome
.Returntheminimumcutsneededfora
palindrome
partitioningofs.Forexample
cmershen
·
2016-05-31 23:00
Palindrome
Pairs
Givenalistofuniquewords.Findallpairsofdistinctindices(i,j)inthegivenlist,sothattheconcatenationofthetwowords,i.e.words[i]+words[j]isa
palindrome
.Example1
yeshiwu
·
2016-05-31 18:00
java
LeetCode
HashMap
回文串
Palindrome
Partitioning
题目原文:Givenastrings,partitionssuchthateverysubstringofthepartitionisa
palindrome
.Returnallpossible
palindrome
partitioningofs.Forexample
cmershen
·
2016-05-31 16:00
Valid
Palindrome
题目原文:Givenastring,determineifitisa
palindrome
,consideringonlyalphanumericcharactersandignoringcases.题目大意
cmershen
·
2016-05-30 22:00
Palindrome
Linked List
题目原文:Givenasinglylinkedlist,determineifitisa
palindrome
.Followup:CouldyoudoitinO(n)timeandO(1)space?
cmershen
·
2016-05-30 20:00
Palindrome
Number
题目原文:Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.题目大意:判断一个数是不是回文整数,要求不使用额外空间。
cmershen
·
2016-05-30 20:00
C++回文数及素数问题计算方法
分享给大家供大家参考,具体如下:/**作者:刘同宾*完成日期:2012年11月16日*版本号:v1.0**输入描述:编制一个返回值为bool型的函数isPrimer(),用于判断参数是否为素数,is
Palindrome
宾宾琪琪
·
2016-05-30 11:12
判断一个链表是否为回文结构(java实现)
publicstaticbooleanis
Palindrome
(ListNodehead){if(head==null)returnfalse;Stackstack=newStack();ListNodep
csdn_cwj
·
2016-05-29 19:57
数据结构
LeetCode题解——
Palindrome
Pairs
distinct indices (i,j) inthegivenlist,sothattheconcatenationofthetwowords,i.e. words[i]+words[j] isa
palindrome
.Example1
u010025211
·
2016-05-25 20:00
LeetCode
palindrome
LeetCode题解——Shortest
Palindrome
classSolution{ public: stringshortest
Palindrome
(strings){ intsz=s.size()
u010025211
·
2016-05-25 20:00
LeetCode
回文串
Valid
Palindrome
题目Givenastring,determineifitisa
palindrome
,consideringonlyalphanumericcharactersandignoringcases.Forexample
白菜炖豆腐
·
2016-05-24 23:52
Palindrome
Linked List
题目描述:Givenasinglylinkedlist,determineifitisa
palindrome
.Followup:CouldyoudoitinO(n)timeandO(1)space?
yeshiwu
·
2016-05-24 11:00
java
LeetCode
链表
Palindrome
Number
9.
Palindrome
NumberDeterminewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.Somehints:Couldnegativeintegersbe
palindrome
s
NNNNNNNNNNNNY
·
2016-05-24 10:00
Manacher算法--O(n)回文子串算法
6645824http://zhuhongcheng.wordpress.com/2009/08/02/a-simple-linear-time-algorithm-for-finding-longest-
palindrome
-sub-string
秦少峰
·
2016-05-18 15:25
LeetCode-234.
Palindrome
Linked List
https://leetcode.com/problems/
palindrome
-linked-list/Givenasinglylinkedlist,determineifitisa
palindrome
.Followup
zmq570235977
·
2016-05-15 22:00
LeetCode
stack
LeetCode-9.
Palindrome
Number
https://leetcode.com/problems/
palindrome
-number/Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.Dothiswithoutextraspace
zmq570235977
·
2016-05-15 21:00
LeetCode
LeetCode刷题之旅(9)
首先对位数进行判断,拿到位数值之后对第一位数字和最后一位数字进行相等性的判断,由于每次都去掉两位数字所以除以100,解决代码如下:publicclassSolution{publicbooleanis
Palindrome
KeepLearn_2016
·
2016-05-15 20:36
LeetCode
LeetCode刷题之旅(5)
解决代码如下:publicclassSolution{publicStringlongest
Palindrome
(Strings){inti,j,max=0,c=0,n=s.length();Stringresult
KeepLearn_2016
·
2016-05-14 10:22
LeetCode
POJ 1159
Palindrome
原题请戳这里题意:给你个串,求最少添加多少个字符使它成为回文串。思路:没有思路网上题解的思路DP将正序列和反序列做一次LCS就行dp[i][j]表示正向到i,反向到j的LCS长度dp[i][j]=max(dp[i-1][j-1]+1//正向i==反向jdp[i-1][j],dp[i][j-1]//正向i!=反向j)最后要求的是len-dp[len][len]转自:http://blog.csdn.
qq_31785871
·
2016-05-13 17:00
C++
dp
poj
Palindrome
Linked List-回文链表|双指针
原题链接:234.
Palindrome
LinkedList【思路】题目要求时间复杂度为O(n),空间复杂度为O(1),那么蛮力算法首先排除了。链表长度分为奇数和偶数情况。
Code_Granker
·
2016-05-12 13:36
LeetCode
leetcode
Java
Palindrome
Linked List
原题链接:234.
Palindrome
LinkedList【思路】题目要求时间复杂度为O(n),空间复杂度为O(1),那么蛮力算法首先排除了。链表长度分为奇数和偶数情况。
happyaaaaaaaaaaa
·
2016-05-12 13:00
java
LeetCode
提高篇项目6——回文数
*文件名称:is
Palindrome
.c *作者:兰泽泽 *完成日期:2016年5月10日 *版本号:v1.0 *问题描述:编制is
Palindrome
(),用于判断参数是否是回文数——回文数,即从前往后读和从后往前读都一样的数
Flashfuture
·
2016-05-12 10:00
Python实现回文数字筛选
代码:#-*-coding:utf-8-*- #杨鑫 defis_
Palindrome
(n): n=str(n) returnn==n[::-1]#[::-1]表示的是反向输出的意思 output=filter
u012965373
·
2016-05-11 14:00
Shortest
Palindrome
#include #include #include #include usingnamespacestd; /* GivenastringS,youareallowedtoconvertittoa
palindrome
byadding
github_34333284
·
2016-05-11 11:00
poj 1159
Palindrome
Palindrome
TimeLimit:3000MS MemoryLimit:65536KTotalSubmissions:44186 Accepted:15050DescriptionA
palindrome
isasymmetricalstring
SCAU_BIN
·
2016-05-10 22:00
Palindrome
Number
Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace.回文数:1.负数不是回文数;2.逆序和正序表示的数字相同。
huakaimo
·
2016-05-10 17:00
poj 1159
Palindrome
-- 回文串,动态规划
Palindrome
TimeLimit: 3000MS MemoryLimit: 65536KTotalSubmissions: 59029 Accepted: 20505DescriptionA
palindrome
isasymmetricalstring
qq_27717967
·
2016-05-10 10:00
动态规划
poj
URAL 2040
Palindrome
s and Super Abilities 2(回文树)
Palindrome
sandSuperAbilities 2TimeLimit: 1MS MemoryLimit: 102400KB 64bitIOFormat: %I64d&%I64uStatusDescriptionDimaaddsletters
Dacc123
·
2016-05-10 08:00
and
Palindromes
2040
ural
回文树
Supe
Palindrome
Pairs(C++实现)
本文给出五种C++程序实现的代码!前三种解答程序,已Accepted!是从网上整理来的,加上本人一些分析和代码备注,让看的朋友更容易理解。解答思路一:(最快解答)用哈希表来建立每个单词和其位置的映射,一个set来保存出现过的单词的长度。算法的思想是,遍历单词集,对于遍历到的单词,我们对其翻转一下,然后在哈希表查找翻转后的字符串是否存在,注意不能和原字符串的坐标位置相同,因为有可能一个单词翻转后和原
jingmiaa
·
2016-05-09 22:00
LeetCode
C++
CodeForces 17E Palisection(回文树)
E.Palisectiontimelimitpertest2secondsmemorylimitpertest128megabytesinputstandardinputoutputstandardoutputInanEnglishclassNickhadnothingtodoatall,andrememberedaboutwonderfulstringscalled
palindrome
s.We
Dacc123
·
2016-05-09 18:00
字符串
codeforces
回文树
17E
Palisection
Dual
Palindrome
s
http://train.usaco.org/usacoprob2?a=C2JqJy82RWk&S=dualpal题目大意:双重回文:在2---10进制表示下,至少有2种表示为回文数字输入:N,S输出:大于S的前N个回文数字#include #include usingnamespacestd; strings="0123456789"; stringconvert(intn,intr)//n(1
achenkui
·
2016-05-09 16:00
C++
水题
【回文子串的个数】HDU1544
Palindrome
s【字符缩距/奇偶判断】
pid=1544ProblemDescriptionAregular
palindrome
isastringofnumbersorlettersthatisthesameforwardasbackward.Forexample
wlxsq
·
2016-05-09 10:00
Palindrome
Number 判断数字是否为对称
9.
Palindrome
Number问题:给定一个int型数据,判断是否为回文数字,也就是说数字是否对称,例如“12321”“1221”。
u010223431
·
2016-05-09 09:00
LeetCode
boolean
int
palindrome
数字对称
Codeforces Round #258 (Div. 2) D. Count Good Substrings
Wecallastringgood,ifaftermergingalltheconsecutiveequalcharacters,theresultingstringis
palindrome
.Forexample
u014258433
·
2016-05-08 21:00
ACM
好题
SPOJ Number of
Palindrome
s(回文树)
Numberof
Palindrome
sTimeLimit: 100MS MemoryLimit: 1572864KB 64bitIOFormat: %lld&%lluSubmit StatusDescriptionEach
palindrome
canbealwayscreatedfromtheother
palindrome
s
Dacc123
·
2016-05-07 19:00
number
of
spoj
palindrome
回文树
LeetCode---
Palindrome
Number解题分析
判断一个数字是否是回文数字解题思路:我们在判断一个字符串是否是回文串常用的方法就是将字符串逆序,然后判断与原来字符串是否相等,同理的思路运用到这里//解题思路一:将整数转化为字符串,再逆序字符串判断是否为回文串 booleanis
Palindrome
u012050154
·
2016-05-07 18:00
hdu_1513_
Palindrome
(LCS+滚动数组)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=1513题意:给你一个字符串,问你最少插入多少个字符使其为回文字符。题解:将字符串倒着保存,然后求一下原串和该串的最长公共子序列,然后字符串长度剪LCS就是答案#include #defineFFC(i,a,b)for(inti=a;idp[i%2][j-1]?dp[(i-1)%2][j]:dp[i%2]
bin_gege
·
2016-05-06 22:00
dp
HDU 2163
Palindrome
s
链接: http://acm.hdu.edu.cn/showproblem.php?pid=2163还是判断回文,栈,输入“STOP”时停止#include #include #include #include usingnamespacestd; intmain() { intk=1; charstr[53]; while(cin>>str,strcmp(str,"STOP")) { boolf
azhuge233
·
2016-05-06 21:00
字符串
栈
水题
HDU2163
HDU 2029
Palindrome
s _easy version
链接: http://acm.hdu.edu.cn/showproblem.php?pid=2029栈的运用//不用栈也可以当时把奇数和偶数分开写了,有点啰嗦,其实非常简单#include #include #include usingnamespacestd; intmain() { intT; cin>>T; while(T--) { charstr[1000]; stacks; while(
azhuge233
·
2016-05-06 21:00
字符串
栈
水题
HDU2029
[USACO1.5]回文质数 Prime
Palindrome
s
题目描述因为151既是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以151是回文质数。写一个程序来找出范围[a,b](5 #include boolc[10000000]; intmain(){ intk,j,a,b,i; scanf("%d%d",&a,&b); if(b>9999999)b=9999999; for(i=2;i<=int(sqrt(b));i++) if(!c[i
qq_34215568
·
2016-05-06 21:00
C语言
【LeetCode 214】最长回文子串
题目链接:https://leetcode.com/problems/shortest-
palindrome
/题目描述:给一个字符串s,求在其前方添加最少的字符使添加后的s是回文串,并返回该回文串。
zhong123123123
·
2016-05-06 13:00
回文链表之程序员面试经典
测试样例:{1,2,3,2,1}返回:true{1,2,3,2,3}返回:false代码实现:publicbooleanis
Palindrome
(ListNodepHead){ if(pHead==null
u014136713
·
2016-05-04 23:00
HDU 1544
Palindrome
s(求回文字符串)
Palindrome
sTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission
huatian5
·
2016-05-04 22:00
HDU
回文
57-
Palindrome
Linked List
Palindrome
LinkedListMySubmissionsQuestionEditorialSolutionTotalAccepted:46990TotalSubmissions:166743Difficulty
justdoithai
·
2016-05-04 11:00
list
linked
palindrome
Palindrome
Number [easy] (Python)
题目链接https://leetcode.com/problems/
palindrome
-number/题目原文Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace
coder_orz
·
2016-05-03 22:37
python
LeetCode
LeetCode
LeetCode解题报告
Palindrome
Number [easy] (Python)
题目链接https://leetcode.com/problems/
palindrome
-number/题目原文Determinewhetheranintegerisa
palindrome
.Dothiswithoutextraspace
coder_orz
·
2016-05-03 22:00
LeetCode
python
UVA 11584 Partitioning by
Palindrome
s 区间dp
点击打开题目链接一个由小写字母组成的字符串,划分成尽量少的回文串。感觉和最长上升子序列差不多,区间dp,方法不对,导致TLE了好久。dp[R]=min(dp[R],dp[L-1]+1)(L #include #include #include usingnamespacestd; constintMAXN=1000+10; intdp[MAXN]; charch[MAXN]; boolisPa
Houheshuai
·
2016-05-03 19:00
dp
ACM
Palindrome
Linked List [easy] (Python)
题目链接https://leetcode.com/problems/
palindrome
-linked-list/题目原文Givenasinglylinkedlist,determineifitisa
palindrome
.Followup
coder_orz
·
2016-05-03 19:18
LeetCode
LeetCode解题报告
上一页
56
57
58
59
60
61
62
63
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他