substring 方法用于提取字符串中介于两个指定下标之间的字符substring(start,end)开始和结束的位置,从零开始的索引参数 描述 start 必需。一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置。 stop 可选。一个非负的整数,比要提取...
分类:
Web程序 时间:
2015-06-29 11:39:17
阅读次数:
115
题意很简单,就是寻找一个字符串中连续的最长包含不同字母的子串。其实用最朴素的方法,从当前字符开始寻找,找到以当前字符开头的最长子串。这个方法猛一看是个n方的算法,但是要注意到由于字符数目的限制,其实这是个O(Cn)的算法,最长也不过是C长度。所以我觉得普通方法应该是能过的。于是写了一个,字符数目最大...
分类:
其他好文 时间:
2015-06-29 00:23:08
阅读次数:
107
1 class Solution { 2 public: 3 /** 4 * @param A, B: Two string. 5 * @return: the length of the longest common substring. 6 */ ...
分类:
其他好文 时间:
2015-06-28 17:00:49
阅读次数:
94
1.查找一个String中,subString的出现次数2.代码package Test;public class TestStringContain { public static void main(String[] args) { String str = "javakkjava--java....
分类:
编程语言 时间:
2015-06-27 22:43:16
阅读次数:
151
uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 上面的 uri 根据你的实际情况定。 ${fn:substring("你要截取的字符串"),beginIndex,endIndex} 网友回复:可以截取,用fn函数: %@ taglib prefix="fn" uri="http://java.su...
分类:
Web程序 时间:
2015-06-26 18:06:08
阅读次数:
183
【LeetCode】Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
查找给定字符串中最长的无重复字符的子串...
分类:
其他好文 时间:
2015-06-26 16:22:02
阅读次数:
103
源数据为'yyyymmddhh24miss',则SQL为CONVERT(datetime, SUBSTRING(opentime,1,4) +'/'+SUBSTRING(opentime,5,2) +'/'+SUBSTRING(opentime,7,2)+' ' +SUBSTRING(open...
分类:
数据库 时间:
2015-06-25 19:03:24
阅读次数:
218
Leetcode 03 Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For e...
分类:
其他好文 时间:
2015-06-23 23:07:53
阅读次数:
115
题目三: Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.For example, ...
分类:
其他好文 时间:
2015-06-23 22:59:27
阅读次数:
112
例子如下:CREATETEMPORARYTABLENEW_TIME_CLIENT(UUIDVARCHAR(36),CLIENT_MAC
VARCHAR(17),ONLINE_SECONDSINT)ENGINE=MEMORY;SET@SQL_NEW_TIME_CLIENT=CONCAT("INSERTINTONEW_TIME_CLIENTSELECTUUID,SUBSTRING(RVALUE,1,17)CLIENT_MAC,SUBSTRING(RVALUE,19)
ONLINE_SECONDSFROM..
分类:
数据库 时间:
2015-06-23 15:55:25
阅读次数:
175