SUBSTRING函数作用:截取字符串语法:SUBSTRING(字符串,开始位置,结束位置)示例:SELECTSUBSTRING(‘床前明月光疑是地上霜‘,3,5)结果:明月光疑是CHARINDEX函数作用:查找字符串的起始位置语法:CHARINDEX(需查找的字符串,字符串[,起始位置])如果没有录入起始位置则默认从第一个..
分类:
其他好文 时间:
2015-07-23 00:58:21
阅读次数:
211
Given a string,find the length of the longest substring without repeating characters. Forexample, the longest substring without repeating letters for"abcabcbb" is "abc", which the length is 3. For"bbb...
分类:
其他好文 时间:
2015-07-21 12:54:53
阅读次数:
84
076 Minimum Window Substring这道题就是用一个dictionary来跟踪有多少还需要Match的字母以及当前需要match的次数。 再用一个queue 来记录哪些字幕被Match了以及他们被match的顺序from collections import defaultdic...
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BAN...
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...
分类:
其他好文 时间:
2015-07-19 10:00:25
阅读次数:
125
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-07-18 21:14:22
阅读次数:
120
题目:
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum windo...
分类:
编程语言 时间:
2015-07-18 12:38:58
阅读次数:
196
030 Substring with Concatenation of All Words用一个dictiionary来记录当前对应还有多少需要match的word。 dict.copy()用来copy dictionary.from collections import defaultdictcl...
分类:
其他好文 时间:
2015-07-17 15:49:29
阅读次数:
97
1.8 Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 i...
分类:
其他好文 时间:
2015-07-17 07:08:39
阅读次数:
104
String url=" ";if(!weather_pic.equals("")) { if(weather_pic.indexOf("src")>-1) { url=url.substring(url.indexOf("src")+5,url.indexOf("png")+3); } }截取之....
分类:
编程语言 时间:
2015-07-17 00:02:29
阅读次数:
315