算法思想:http://www.cnblogs.com/lichen782/p/leetcode_minimum_window_substring_3.html 1 public class Solution { 2 public String minWindow(String S, Str...
1198. SubstringConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionDr lee cuts a string S into N pieces,s[1],…,s[N].Now, Dr lee gives you the...
分类:
其他好文 时间:
2014-09-26 03:29:48
阅读次数:
253
function parseQueryString(url){ var obj={}; var keyvalue=[]; var key="",value=""; var paraString=url.substring(url.indexOf("?")+1,url.l...
分类:
Web程序 时间:
2014-09-25 13:45:08
阅读次数:
176
今天有幸去搜狗霸笔,有一题很有意思
String str1 = "test for sougou";
String str2 = str1.substring(5);
考点是str2是否生成新的字符数组来保存"for sougou"
当时我认为String内部是封装了一个char[],无法像cpp一样首地址加上一个数字来做到char[]的重用
新的字符串必须进行一次ArrayCop...
分类:
移动开发 时间:
2014-09-25 02:24:38
阅读次数:
241
declare 定义变量 set 为变量赋值SUBSTRING()函数SUBSTRING ( expression, start, length )expression 字符串、二进制字符串、文本、图像、列或包含列的表达式。请勿使用包含聚合函数的表达式。start 整数或可以隐式转换为 int 的表...
分类:
数据库 时间:
2014-09-24 20:31:47
阅读次数:
211
字符串匹配的双重递归式写法
字符串的匹配有很高效的KMP、Sunday等算法,可供使用。下面使用的匹配算法本质上是朴素的,但它的双重递归式的写法仍然值得借鉴。...
分类:
其他好文 时间:
2014-09-24 13:19:46
阅读次数:
158
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
编程语言 时间:
2014-09-22 23:29:43
阅读次数:
231
【JavaSe】java中关于subString()和indexOf()的用法/**
*@详解关于subString()和indexOf()的用法,怎么联合使用
*@author小夜的传说
*
*/
publicclassTest{
publicstaticvoidmain(String[]args){
Stringstr="mynameisxiaoye‘schuanshou";
str=str.substring(6);//str=str..
分类:
编程语言 时间:
2014-09-22 20:10:13
阅读次数:
199
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.
For "(()", the longest valid parentheses substring is "()", which ...
分类:
其他好文 时间:
2014-09-22 03:21:11
阅读次数:
264
package 字符串2;public class TestString {public static void main(String[] args) { String str = "Returns a new character sequence that is a subsequence of...
分类:
其他好文 时间:
2014-09-20 17:35:59
阅读次数:
182