题意:给你一个字符串init,要求你支持两个操作(1):在当前字符串的后面插入一个字符串(2):询问字符串s在当前字符串中出现了几次?(作为连续子串) 必须在线。构建SAM,再用LCT维护Parent Tree。每次新加一个结点,对它的祖先的Right集合大小都加了1,(Right集合的定义见CL....
分类:
其他好文 时间:
2015-04-10 19:51:34
阅读次数:
233
Problem 2 ---Add Two Numbers简单的模拟题。Problem 3 ---Longest Substring Without Repeating Characters题意: 给定一个字符串序列,找出最长无重复的子序列。如"abcabcbb"的最长不重复子序列为"abc"思路: ...
分类:
其他好文 时间:
2015-04-10 19:28:51
阅读次数:
100
Java中substring方法可以分解字符串,返回的是原字符串的一个子字符串。如果要讲一个字符串分解为一个一个的单词或者标记,StringTokenizer可以帮你。先看个例子:publicstaticvoidmain(String[]args){StringTokenizerst=newStri...
分类:
编程语言 时间:
2015-04-10 15:09:27
阅读次数:
134
4.Median of Two Sorted Arrays
5.Longest Palindromic Substring
6.ZigZag Conversion...
分类:
编程语言 时间:
2015-04-10 11:36:28
阅读次数:
149
题目:Given a string, find the length of the longest substring without repeating characters.For example, the longest substring without repeating letters ...
分类:
其他好文 时间:
2015-04-10 07:00:16
阅读次数:
120
需求:如果对于一行内容过长,则截取前N个字符 其余用省略号表示struts截取字符串方法如下: 50">
...
50">
...
如果不用里面的判断直接写则只会截取长度大于50的,其他小于50的就不会...
分类:
其他好文 时间:
2015-04-09 21:51:48
阅读次数:
122
Problem Description
Given two strings, you have to tell the length of the Longest Common Substring of them.For example:
str1 = banana
str2 = cianaicSo the Longest Common Substring is “ana”, and the...
分类:
编程语言 时间:
2015-04-09 15:33:59
阅读次数:
225
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-04-09 15:18:13
阅读次数:
115
declare @canshu varchar(200)set @canshu='24§咨询客户'--某符号之后的字段内容select substring(@canshu,charindex('§',@canshu,0)+1,100)--某符号之前的字段内容select substring(@can...
分类:
数据库 时间:
2015-04-09 10:24:04
阅读次数:
244
String baseinfo="/com/Bean/DBhelp.properties"; filename=getClass().getClassLoader().getResource("/").getPath(); filename=filename.substring(1,file...
分类:
编程语言 时间:
2015-04-08 21:21:50
阅读次数:
196