java中substring的使用方法str=str.substring(int beginIndex);截取掉str从首字母起长度为beginIndex的字符串,将剩余字符串赋值给str;str=str.substring(int beginIndex,int endIndex);截取str中从b...
分类:
编程语言 时间:
2014-08-16 09:43:10
阅读次数:
155
spoj1811LCS
问两个字符串最长公共子串。
做法很简单。匹配成功,则tl++,失败,从父指针回退,tl=t[now].len。
从这题可以清楚了解后缀自动机fa指针的性质:
指向一个状态,这个状态的接受串s[x..x+i]是与当前状态的接受串后缀s[j-i..j]匹配是最长的一个。
这里是不是发现了一个和KMP很像的性质?
KMP在失配时通过next数组回退,那么这...
分类:
其他好文 时间:
2014-08-15 21:11:29
阅读次数:
281
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s....
分类:
其他好文 时间:
2014-08-14 16:47:18
阅读次数:
218
functioncomptime(beginTime,endTime){varbeginTimes=beginTime.substring(0,10).split('-');varendTimes=endTime.substring(0,10).split('-');//parse方法要求短日期可以...
分类:
Web程序 时间:
2014-08-14 16:29:38
阅读次数:
203
获取文件名(不包括后缀)
originalFileName.substring(0, originalFileName.lastIndexOf("."))
文件重命名
public void renameFile(String file, String toFile) {
File toBeRenamed = new File(file);
//检查...
分类:
编程语言 时间:
2014-08-13 22:23:37
阅读次数:
782
Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ...
分类:
其他好文 时间:
2014-08-13 12:45:46
阅读次数:
166
Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example,...
分类:
其他好文 时间:
2014-08-13 12:23:16
阅读次数:
237
函数库mysql存储过程基本函数包括:字符串类型,数值类型,日期类型一、字符串类CHARSET(str) //返回字串字符集CONCAT (string2 [,… ]) //连接字串INSTR (string ,substring ) //返回substring首次在string中出现的位置,不存在...
分类:
数据库 时间:
2014-08-13 00:29:34
阅读次数:
361
Main reference:http://zhaohongze.com/wordpress/2014/01/04/leetcode-minimum-window-substring/The ART of counting. So difficult and beautiful problem. I...
js中substring和substr的用法substring 方法用于提取字符串中介于两个指定下标之间的字符substring(start,end)开始和结束的位置,从零开始的索引参数 描述 start 必需。一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置。.....
分类:
Web程序 时间:
2014-08-12 13:05:54
阅读次数:
180