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...
分类:
其他好文 时间:
2014-06-28 23:59:00
阅读次数:
383
在Clojure中读取XML是很容易的。比如我们有一个名叫strings.xml文件:1 2 3 FY行情在线4 主页5 读取的步骤如下:1. 在project.clj中添加data.zip的依赖[org.clojure/data.zip "0.1.1"]2. 创建一个reader....
分类:
其他好文 时间:
2014-06-28 12:51:00
阅读次数:
224
今天在github 上面找到了一个关于如何正确使用javascript 来进行我们的程序开发.我就恬不知耻的来了个原创啊..坑爹啊.拿来和大家分享一下吧.
A mostly reasonable approach to Javascript.
Types //类型
Objects //对象
Arrays //数组
Strings //字符串
Fu...
分类:
编程语言 时间:
2014-06-22 19:13:40
阅读次数:
240
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
求数字字符串的二进制和。同之前的数组代表数字,两个数组相加一样,只不过进位变成了2.可能两个串的长度不一样,故逆转,从左到右加下去,最后再逆转。
publi...
分类:
其他好文 时间:
2014-06-21 20:11:21
阅读次数:
344
join(string, ...) Returns a new string formed by joining the strings using File::SEPARATOR.File.join("usr", "mail", "gumby") #=> "usr/mail/gumby"rea.....
分类:
其他好文 时间:
2014-06-21 08:28:24
阅读次数:
224
Longest Palindromic Substring:Given a stringS, find the longest palindromic substring inS.You may assume that the maximum length ofSis 1000, and there...
分类:
其他好文 时间:
2014-06-21 07:36:18
阅读次数:
227
题目
Write a function to find the longest common prefix string amongst an array of strings.
方法
从第一个字符开始,判断是否相同。
public String longestCommonPrefix(String[] strs) {
if (strs ...
分类:
其他好文 时间:
2014-06-18 11:18:30
阅读次数:
205
#include #include #include char a[1000001];int next[1000001];int l;void Getnext(){ int j=-1; int i=0; next[0]=-1;//忘写了,死循环 while(i...
分类:
其他好文 时间:
2014-06-18 09:35:19
阅读次数:
138
Write a function to find the longest common prefix string amongst an array of strings.题解: 寻找一组字符串的最长公共前缀。最简单的方法,用一个字符串记录当前最长的公共前缀,然后依次比较。时间复杂度: O(N). ...
分类:
其他好文 时间:
2014-06-18 00:03:08
阅读次数:
274
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...
分类:
其他好文 时间:
2014-06-17 14:35:50
阅读次数:
297