Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2015-04-03 11:10:45
阅读次数:
102
LeetCode #Longest Substring Without Repeating Characters#
折腾了一回,第一感觉就是没有感觉...这种没技巧的话暴力是不现实的..而后发现其实没有很好理解题目的意
思考过么?究竟什么是最长的子字符串
这里有个很要命的概念, 子字符串,别小看这家伙.是搞定题目的关键.
"abcduiwe" 这...
分类:
其他好文 时间:
2015-04-03 00:18:57
阅读次数:
115
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 "()",
...
分类:
其他好文 时间:
2015-04-02 11:40:03
阅读次数:
114
substring(int beginIndex, int endIndex)方法在JDK6和JDK7中是不同的。了解他们的区别可以让我们更好的使用这个方法。方便起见,以下用substring() 代替 substring(int beginIndex, int endIndex)。1. subst...
分类:
其他好文 时间:
2015-04-02 06:34:30
阅读次数:
121
You’ve got string s, consisting of small English letters. Some of the English letters are good, the rest are bad.A substring s[l…r] (1?≤?l?≤?r?≤?|s|) of string s??=??s1s2…s|s| (where |s| is the length...
分类:
其他好文 时间:
2015-04-01 22:07:34
阅读次数:
221
题目链接:
https://leetcode.com/problems/substring-with-concatenation-of-all-words/
参考链接:
http://www.w2bc.com/Article/14500
思路:
题目大意为,给定一个字符串S和一个字符串数组L,L中的各字符串长度均相等。找出S中所有的子串,这些子串恰好包含L中所有字符各一次,返...
分类:
其他好文 时间:
2015-04-01 11:31:20
阅读次数:
146
题目:
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...
题目:
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
思路:第一种思路,就是以某...
分类:
其他好文 时间:
2015-04-01 09:30:28
阅读次数:
115
网站标题被注入黑链接,使用sql脚本update修改字段内的字符串截取UPDATE [qds0460132_db].[dbo].[Blood_News] SET [Blood_Name] = SUBSTRING(Blood_Name, 0,charindex('<',Blood_Name))GO注:...
分类:
数据库 时间:
2015-03-31 19:51:35
阅读次数:
322
题意:给定一个字符串,查找最长的子串的长度(没有重复字符)。原题来自:https://leetcode.com/problems/longest-substring-without-repeating-characters/分析:我自己的思路,和曾经做的求最长公共子串长度一样,不过那个是用二维数组,...
分类:
其他好文 时间:
2015-03-31 12:22:39
阅读次数:
106