Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2014-10-01 09:59:00
阅读次数:
245
Java 7u6 修改了String#substring.的实现...
分类:
其他好文 时间:
2014-10-01 05:34:40
阅读次数:
218
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
编程语言 时间:
2014-10-01 02:49:20
阅读次数:
232
AndyZhangwelcome to java worldc#中字符串截取使用的方法String substring(int beginIndex)String substring(int beginIndex, int endIndex)String.Substring (Int32) 子...
分类:
其他好文 时间:
2014-09-30 18:49:39
阅读次数:
277
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-09-30 17:19:19
阅读次数:
173
SQLServer基本函数SQLServer基本函数1.字符串函数长度与分析用1,datalength(Char_expr)返回字符串包含字符数,但不包含后面的空格2,substring(expression,start,length)取子串,字符串的下标是从“1”,start为起始位置,length为字符串长度,实际应用中以len(expression)取得其..
分类:
数据库 时间:
2014-09-30 05:12:12
阅读次数:
224
substr返回从指定位置开始的指定长度的子字符串str.substr(star[,length])第二个参数可选,不选的话,截取到最后,如果length为0或者负数,那么返回的将是一个空字符串。star从0开始。substring返回的是指定位置的字符串str.substring(star,end...
分类:
Web程序 时间:
2014-09-29 22:07:51
阅读次数:
204
Description
A substring of a string T is defined as:
T( i, k)= TiTi+1... Ti+k-1, 1≤ i≤ i+k-1≤| T|.
Given two strings A, B and one integer K, we define S, a set of triples (i, j, k):
S = ...
分类:
其他好文 时间:
2014-09-29 14:38:51
阅读次数:
277
DescriptionDr lee cuts a string S into N pieces,s[1],…,s[N]. Now, Dr lee gives you these N sub-strings: s[1],…s[N]. There might be several possibiliti...
分类:
其他好文 时间:
2014-09-28 21:56:35
阅读次数:
243
今天再看JDK源码的时候看到了String类的不同版本的实现方式的不同,主要是substring这个方法,JDK6里面的实现方式是:很明显可以看到,调用String对象的substring方法后指向的对象地址并没有发生改变,只是改变的是偏移量,这样的话在GC阶段就有可能造成内存泄露了。还好查了一..
分类:
其他好文 时间:
2014-09-28 18:46:56
阅读次数:
205