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
leetcode[125]Valid
Palindrome
Given a string, determine if it is a
palindrome
, considering only alphanumeric characters and ignoring
·
2015-10-31 10:01
LeetCode
leetcode[132]
Palindrome
Partitioning II
Given a string s, partition s such that every substring of the partition is a
palindrome
·
2015-10-31 10:00
partition
leetcode[131]
Palindrome
Partitioning
Given a string s, partition s such that every substring of the partition is a
palindrome
·
2015-10-31 10:00
partition
Palindrome
Linked List
Given a singly linked list, determine if it is a
palindrome
.
·
2015-10-31 10:33
list
POJ-3974
Palindrome
Manacher算法
题目链接:http://poj.org/problem?id=3974 Manacher算法效率真不错,用后缀数组A的都沙茶了。。 1 //STATUS:C++_AC_235MS_10904KB 2 #include<stdio.h> 3 #include<stdlib.h> 4 #include<string.h> 5 #inc
·
2015-10-31 10:56
poj
POJ-3280 Cheapest
Palindrome
区间DP
题目链接:http://poj.org/problem?id=3280 典型的区间DP问题,fp[i][j]表示第i-j个字符经过修改后的最优值,则状态转移方程如下: f[i][j]=Min(f[i][j],f[i][j-1]+Min(cost[s[j]][0],cost[s[j]][1])); f[i][j]=Min(
·
2015-10-31 10:55
heap
【leetcode】
Palindrome
Number
Determine whether an integer is a
palindrome
. Do this without extra space.
·
2015-10-31 10:39
LeetCode
9.
Palindrome
Number (INT)
Determine whether an integer is a
palindrome
. Do this without extra space.
·
2015-10-31 10:13
number
Palindrome
(poj3974)(manacher算法)
id=3974
Palindrome
Time Limit: 15000MSMemory Limit: 65536K Total Submissions: 2707Accepted: 995 Description
·
2015-10-31 10:11
poj
经典进制转换——USACO Palindromic Squares
Description
Palindrome
s are numbers that read the same forwards as backwards.
·
2015-10-31 10:33
USACO
HDU 2029
Palindrome
s _easy version
1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 int Is
Palindrome
s
·
2015-10-31 10:57
version
LeetCode132:
Palindrome
Partitioning II
题目: Given a string s, partition s such that every substring of the partition is a
palindrome
.
·
2015-10-31 10:03
partition
天题系列: Shortest
Palindrome
纪念一下 Given a string S, you are allowed to convert it to a
palindrome
by adding characters in front of
·
2015-10-31 10:50
test
[Project Euler]加入欧拉 Problem 4
The largest
palindrome
made from the product of two 2-digit numbers is 9009 = 91 × 99.
·
2015-10-31 09:38
project
Valid
Palindrome
[LeetCode]
Given a string, determine if it is a
palindrome
, considering only alphanumeric characters and ignoring
·
2015-10-31 09:23
LeetCode
poj1159
Palindrome
Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 
·
2015-10-31 09:01
poj
[Leetcode]
Palindrome
Partitioning
Given a string s, partition s such that every substring of the partition is a
palindrome
·
2015-10-31 09:12
partition
[Leetcode]
Palindrome
Partitioning II
Given a string s, partition s such that every substring of the partition is a
palindrome
·
2015-10-31 09:12
partition
401
Palindrome
s
Palindrome
s A regular
palindrome
is a string of numbers or letters that is the same
·
2015-10-31 09:42
ROM
leetcode
Palindrome
Number
负数被设定为不是回文数 1 #include<iostream> 2 3 using namespace std; 4 5 int F(int t) 6 { 7 int f = 1; 8 for (int i = 0; i < t; i++) 9 f = f * 10; 10 return f;
·
2015-10-31 09:23
LeetCode
LeetCode --- Valid
Palindrome
附上代码: 1 class Solution { 2 public: 3 bool is
Palindrome
(string s) { 4 if (s.empty())
·
2015-10-31 09:29
LeetCode
Careercup - Facebook面试题 - 5177378863054848
2014-05-02 08:29 题目链接 原题: Write a function for retrieving the total number of substring
palindrome
s
·
2015-10-31 09:21
Facebook
LeetCode - Valid
Palindrome
Valid
Palindrome
2014.1.13 18:48 Given a string, determine if it is a
palindrome
, considering only
·
2015-10-31 09:18
LeetCode
leetcode_125题——Valid
Palindrome
(string,比较常规思路)
Valid
Palindrome
Total Accepted: 48909 Total Submissions: 221328 My Submissions
·
2015-10-31 09:36
LeetCode
【LeetCode 234】
Palindrome
Linked List
Given a singly linked list, determine if it is a
palindrome
.
·
2015-10-31 09:56
LeetCode
UVA 11151 Longest
Palindrome
UVA_11151 状态转移方程为:①b[i]==b[j],f[i][j]=f[i+1][j-1]+(i==j?1:2);②b[i]!=b[j],f[i][j]=max{f[i+1][j],f[i][j-1]}。 #include<stdio.h>#include<string.h>#define MAXD 1010int N,
·
2015-10-31 09:12
long
UVA 10453 Make
Palindrome
UVA_10453 这个题目要求打印最后的结果,所以我们在动规的过程中要记录一下当前的决策,便于我们后面递归去打印回文串。 #include<stdio.h>#include<string.h>#define MAXD 1010#define INF 1000000000int N, f[MAXD][MAXD], p[MAXD][
·
2015-10-31 09:11
Make
UVA 10617 Again
Palindrome
UVA_10617 这个题目可以用区间动规去处理。 我们设f[i][j]为字符串i到j这个区间内回文串的个数,那么如果b[i]==b[j],f[i][j]=f[i+1][j]+f[i][j-1]-f[i+1][j-1]+f[i+1][j-1]+1=f[i+1][j]+f[i][j-1]+1,也就是说f[i][j]包括4个部分,第一部分是b
·
2015-10-31 09:11
ROM
UVA 10739 String to
Palindrome
UVA_10739 我们用f[i][j]表示字符串从第i位到第j位构成回文串最少所需的操作数,如果b[i]==b[j],f[i][j]=f[i+1][j-1],否则f[i][j]=min{f[i][j-1],f[i+1][j],f[i+1][j-1]}+1。 #include<stdio.h>#include<string.h>#
·
2015-10-31 09:10
String
POJ 3974:
Palindrome
Description Andy是计算机系的非常聪明的一个学生,她参加了一门算法课,教授问了学生一个简单的问题:“你能不能高效地在一个字符串中找到最长回文子串呢?”。 如果一个字符串从前往后读和从后往前读是一样的,则字符串被称为是回文。比如“madam”是回文,而“acm”不是回文。 学生意识到这是一个经典的问题,但是他们只能够想到列举所有的子串并且判断这个子串是不是回文,很明显这个算法
·
2015-10-31 08:18
poj
LeetCode
Palindrome
Linked List (回文链表)
题意:给个单链表,判断是否为回文。 思路:有点BT,处理不好都是死循环。一般思路是,二分查找中心点,根据奇偶个元素,反置前半部分,再判断是否回文,再恢复前半部分。 步骤: (1)在二分查找中心点时判断顺便反置前半部分链表。 (2)对奇偶数处理好剩下的工作。这是重点 (3)两个指针来判断是否回文。 (4)将前半段恢复起来,比较简单,有个he
·
2015-10-31 08:26
LeetCode
O(n)回文子串算法 Manacher算法
原文地址:http://zhuhongcheng.wordpress.com/2009/08/02/a-simple-linear-time-algorithm-for-finding-longest-
palindrome
-sub-string
·
2015-10-31 08:06
man
【LeetCode 234_链表】
Palindrome
Linked List
1 ListNode* ReverseList(ListNode *p) { 2 if (p == NULL || p->next == NULL) 3 return p; 4 5 ListNode *pre = NULL; 6 ListNode *next = p->next; 7 while (p)
·
2015-10-31 08:51
LeetCode
Codeforces#277 C,E
Palindrome
Transformation time limit per test 1 second memory limit per test 256 megabytes
·
2015-10-31 08:48
codeforces
USACO习题:Dual
Palindrome
s
核心方法参考如下: View Code bool is_
palindrome
(int num,int base){ int reversed = 0,temp=num; while
·
2015-10-31 08:22
USACO
POJ-3280 Cheapest
Palindrome
动态规划求回文串
前面自己写的动态方程转移出现了问题,还是没有考虑周全. AC代码: #include <cstdlib> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; /* 题意:
·
2015-10-30 20:54
动态规划
URAL 1960
Palindrome
s and Super Abilities(回文树)
题意:给一个字符串,长度不超过10万,问每个前缀的本质不同回文串的个数链接:http://acm.hust.edu.cn/vjudge/problem/visitOriginUrl.action?id=45002解法:这个问题涉及到去重,用manacher似乎并不是那么好做,用后缀数组的话,又会遇到“相同回文串分布在不同位置,所以不好统计“的问题,用回文树的话,就会比较方便。每次将新字符加入回文树
UESTC_peterpan
·
2015-10-30 17:00
数据结构
字符串
回文树
【LeetCode】234 -
Palindrome
Linked List
Given a singly linked list, determine if it is a
palindrome
.
·
2015-10-30 15:03
LeetCode
纪念逝去的岁月——C/C++字符串回文
olleh 输出:1 2、 输入:nihao hello 输出:0 代码 #include <stdio.h> #include <string.h> int
palindrome
·
2015-10-30 14:31
c/c++
POJ1159
Palindrome
Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 
·
2015-10-30 14:25
poj
[Leetcode] Valid
Palindrome
Given a string, determine if it is a
palindrome
, considering only alphanumeric characters and ignoring
·
2015-10-30 14:08
LeetCode
【leetcode】
Palindrome
Number (easy)
Determine whether an integer is a
palindrome
. Do this without extra space.
·
2015-10-30 14:27
LeetCode
LeetCode: Valid
Palindrome
题解
Given a string, determine if it is a
palindrome
, considering only alphanumeric characters and ignoring
·
2015-10-30 14:02
LeetCode
LeetCode:
palindrome
s 题解
Determine whether an integer is a
palindrome
. Do this without extra space.
·
2015-10-30 14:01
LeetCode
uva 10453 - Make
Palindrome
(区间dp,记忆化搜索)
本文出自 http://blog.csdn.net/shuangde800 题目链接: 点击打开链接 题目大意 给一个字符串,要求添加最少个字符,把它变成回文串,并输出。 思路 简单的区间dp, f(i, j) 表示区间(i, j) 内的字符串添加的最少个数,变成回文串
·
2015-10-30 14:49
Make
Palindrome
Linked List
https://leetcode.com/problems/
palindrome
-linked-list/ Given a singly linked list, determine if it is
·
2015-10-30 14:45
list
HDU-4365
Palindrome
graph
首先将没有特殊点的所有的情况都计算出来,再将给定的点都计算到左上角的标记点,最后查看有多少个点已经被覆盖了,减去该部分,最后用快速幂输出结果,注意这里要用long long。 代码如下: #include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #
·
2015-10-30 14:35
Graph
No to
Palindrome
s! 构造不含回文子串的串
http://codeforces.com/contest/465/problem/C 给定n和m,以及一个字符串s,s不存在长度大于2的回文子串,现在要求输出一个字典比s大的字符串,且串中字母在一定范围内,并且说同样不存在长度大于2的回文子串。 直接去递归构造即可,从最后一位开始,每次只要判断是否子串中含有回文串,其实仔细想想只要考虑是否存在一个字符和前两个字符中的一个相同即可。不卡
·
2015-10-30 13:14
codeforces
LeetCode -
Palindrome
Number
LeetCode -
Palindrome
Number 2013.12.1 22:24 Determine whether an integer is a
palindrome
.
·
2015-10-30 13:50
LeetCode
HDU-4632
Palindrome
subsequence 区间DP
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4632 区间DP,f[i][j]表示[i,j]区间回文字串的个数。f[i][j]=f[i+1][j]+f[i][j-1]-f[i+1][j-1]+s[i]==s[j]?f[i-1]+f[j-1]+1:0 。 1 //STATUS:C++_AC_281MS_4188KB 2 #incl
·
2015-10-30 13:10
sequence
上一页
71
72
73
74
75
76
77
78
下一页
按字母分类:
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
其他