Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-01-23 18:12:03
阅读次数:
171
题目描述:Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example,...
分类:
其他好文 时间:
2015-01-23 16:15:18
阅读次数:
131
原题地址将L中的单词看成一个整体,这道题与Minimun Window String比较类似,都是利用滑动窗口搜索。所以,依次枚举所有S的起始位置i,从i处开始搜索。当然并不需要枚举所有的i,i最多等于L中单词长度-1。比如L中的单词长度为3,那么当枚举过i=0,1,2后,不用再尝试i=3了,因为结...
分类:
其他好文 时间:
2015-01-22 20:09:58
阅读次数:
189
https://oj.leetcode.com/problems/longest-palindromic-substring/Given a stringS, find the longest palindromic substring inS. You may assume that the ma...
分类:
其他好文 时间:
2015-01-22 17:24:11
阅读次数:
105
原题地址用两个指针分别记录窗口的左右边界,移动指针时忽略那些出现在S种但是没有出现在T中的字符1. 扩展窗口。向右移动右指针,当窗口内的字符即将多于T内的字符时,停止右移2. 收缩窗口。向右调整左指针,当窗口内的字符即将少于T内的字符时,停止右移3. 统计结果。如果窗口内的字符包含了T内的所有字符,...
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s = “eceba”,T is "ece" which...
分类:
其他好文 时间:
2015-01-22 14:52:17
阅读次数:
134
private void CreateDesktop() { string path = this.Context.Parameters["targetdir"]; path = path.Substring(0, path.LastIn...
分类:
其他好文 时间:
2015-01-22 12:29:11
阅读次数:
157
1、string var string = "this is mine" string.substring(); //截取函数 string.toLowerCase(); //换换小写 string.toUpperCase(); //转换大写 string.indexOf("is")...
分类:
Web程序 时间:
2015-01-22 10:48:26
阅读次数:
279
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 longes...
分类:
其他好文 时间:
2015-01-22 00:10:52
阅读次数:
142
题目意思是,给你提供两个数字 a 和 ba 可以不断的往上加, 直到b 为其子串问的是 a 最小加几?显而易见,a 的数据范围给了10 ^100非常大,直接模拟肯定不行那么就用 b 减去 a 来找,也算是一种模拟的方法举个例子, a = 1299, b = 3333 330 3300 ...
分类:
其他好文 时间:
2015-01-21 23:48:30
阅读次数:
197