1、题目名称 Isomorphic Strings(同构的字符串) 2、题目地址 https://leetcode.com/problems/isomorphic-strings/ 3、题目内容 英文: Given two strings s and t, determine if they are isomorphic. Two str...
分类:
其他好文 时间:
2015-08-08 23:06:41
阅读次数:
440
Given two strings s and t, write a function to determine if t is an anagram of s.
For example,
s = "anagram", t = "nagaram", return true.
s = "rat", t = "car", return false.
Note:
You may a...
分类:
其他好文 时间:
2015-08-08 21:21:56
阅读次数:
140
Description
Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Ham...
分类:
其他好文 时间:
2015-08-08 18:25:39
阅读次数:
117
https://leetcode.com/problems/add-binary/题目:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".思路:...
分类:
其他好文 时间:
2015-08-08 13:33:55
阅读次数:
83
jQuery 源码中的 quickExpr 是用来检测参数 selector 是否是复杂的 HTML 代码(如“abc”)或 #id,匹配结果存放在数组 match 中1 // A simple way to check for HTML strings or ID strings2 // Prio...
分类:
Web程序 时间:
2015-08-08 13:26:04
阅读次数:
339
Power Strings
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 37564
Accepted: 15532
Description
Given two strings a and b we define a*b to be their concatena...
分类:
其他好文 时间:
2015-08-07 22:28:09
阅读次数:
92
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 37439
Accepted: 15467
Description
Given two strings a and b we define a*b to be their concatenation. For example, ...
分类:
其他好文 时间:
2015-08-07 20:16:01
阅读次数:
78
学算法之后,Ac的第一道题。
分析:当i%(i-p[i])==0&&p[i]!=0时,字符串结束循环。并且,偱环节长度为 i-p[i],循环次数为
i/(i-p[i]).
#include
#include
int len;
int p[1000010];
char str[1000010];
void getp()
{
int i=0,j=-1;
p[i]=j;
w...
分类:
其他好文 时间:
2015-08-07 20:08:14
阅读次数:
125
Power Strings
Time Limit : 6000/3000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)
Total Submission(s) : 70 Accepted Submission(s) : 27
Problem Description
Given two strings a and ...
分类:
其他好文 时间:
2015-08-07 20:06:03
阅读次数:
124
Description
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponenti...
分类:
其他好文 时间:
2015-08-07 20:04:56
阅读次数:
132