Problem Description:
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
分析:题目要求输出找出所有在字符串数组中的变形词,变形词的意思是指单词由相同的字母构成,只是字母在单词中的顺序...
分类:
其他好文 时间:
2014-08-01 16:09:01
阅读次数:
164
Problem Description:
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
分析:两个string相乘...
分类:
其他好文 时间:
2014-08-01 16:06:01
阅读次数:
141
Longest Palindromic SubstringGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-08-01 04:47:25
阅读次数:
243
Longest Common PrefixWrite a function to find the longest common prefix string amongst an array of strings.算法思路:思路:貌似木有什么捷径,逐个比较,遇到不同即断开。代码如下: 1 publi...
分类:
其他好文 时间:
2014-07-31 23:31:50
阅读次数:
231
题目:
Product
The Problem
The problem is to multiply two integers X, Y. (0250)
The Input
The input will consist of a set of pairs of lines. Each line in pair contains one mu...
分类:
其他好文 时间:
2014-07-29 18:03:42
阅读次数:
283
题目来源:http://poj.org/problem?id=2406主要考察KMP算法中next数组的性质,根据next[len]可以知道前len-1字符串最长前缀和后缀的循环长度那么len-next[len]即为一个循环单位的长度,倘若循环单位len-next[len]不是len的整数倍,则an...
分类:
其他好文 时间:
2014-07-29 17:07:22
阅读次数:
168
android:id 为控件指定相应的ID。 android:text 指定控件当中显示的文字,需要注意的是,这里尽量使用strings.xml文件当中的字符串。 android:textSize 指定控件当中字体的大小。 android:background 指定该控件所...
分类:
移动开发 时间:
2014-07-29 16:11:39
阅读次数:
397
Problem StatementWe have three types of brackets: "()", "[]", and "{}". We are now interested in some special strings. A string is special if all the ...
分类:
其他好文 时间:
2014-07-29 12:41:06
阅读次数:
187
题目:Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.题解:这道题看所给的字符串数组里面有多少个是同一个变形词变的。这道....
分类:
编程语言 时间:
2014-07-29 12:17:46
阅读次数:
267
A -Power Strings 难度:☆☆Time Limit:3000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 2406DescriptionGiven two strings a and...
分类:
其他好文 时间:
2014-07-28 21:23:54
阅读次数:
216