码迷,mamicode.com
首页 >  
搜索关键字:substring    ( 3892个结果
EL表达式截取字符串
${wjcd.lrsj}原来得到的是如2006-11-12 11:22:22.0${fn:substring(wjcd.lrsj, 0, 16)}使用functions函数来获取list的长度${fn:length(list)} fn:contains(string, substring) ...
分类:其他好文   时间:2014-09-15 22:34:29    阅读次数:317
最长公共子串
最长公共子串(Longest Common Substring)是一个非常经典的问题,它的基本描述为“给定两个字符串,求出它们之间最长的相同子字符串(要求连续)的长度”。求N个最长为L的字符串的的LCS的方法大致可分为以下几类:1.枚举法显然是简单但极端低效的算法,改进一些的算法是用一个串的每个后缀对其他所有串进行部分匹配,用KMP算法,时间复杂度为O(NL2)。2.动态规划解法:平方的时间算法。3.后缀数组与高度数组解法,利用二分查找技术,时间复杂度为O(NLlogL)。3.广义后缀树方法,时间复杂度为可...
分类:其他好文   时间:2014-09-15 21:22:49    阅读次数:389
LeetCode 29 Substring with Concatenation of All Words
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:其他好文   时间:2014-09-15 14:22:39    阅读次数:222
java 文件格式转换工具
有时候一个文件格式正确在某些情况下不一定能够正确播放,下面可以借助于java的一个类帮助我们把文件格式转正确 File source = new File(filepath); int index=amr.lastIndexOf("."); wavFile=amr.substring(0,index)+".wav"; File target = new File(wavFile); Au...
分类:编程语言   时间:2014-09-15 11:16:58    阅读次数:275
【数据处理】20商品销售匹配
select a.pluno,a.pluname,a.spec,a.qty,d.qty,e.qty,a.dptno,substring(a.dptno,1,3),f.dptname,substring(a.dptno,1,4),g.dptname,substring(a.dptno,1,5),h.d...
分类:其他好文   时间:2014-09-14 15:16:07    阅读次数:225
Longest Substring Without Repeating Characters[leetcode]
记录最大的起始位置+hash int lengthOfLongestSubstring(string s) { map charMap; int curLen, maxLen = 0,lastIndex = -1; for (int i = 0; i < s.size(); i++) { if (charMa...
分类:其他好文   时间:2014-09-14 12:53:27    阅读次数:158
Longest Palindromic Substring[leetcode]
实现了两种方法,一种是DP,用循环做的,递归的话更简单。 string longestPalindrome(string s) { int n = s.size(); bool dp[1001][1001]; int maxl = 1; int maxs = 0; for (int i = n - 1; i >= 0...
分类:其他好文   时间:2014-09-14 12:53:07    阅读次数:190
leetcode - Longest Palindromic Substring
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...
分类:其他好文   时间:2014-09-14 12:49:37    阅读次数:214
在论坛中出现的比较难的sql问题:22(字符串拆分、字符串合并、非连续数字的间隔范围、随机返回字符串)
在论坛中看到一个帖子,帖子中有一些sql方面的面试题,我觉得这些面试题很有代表性。 下面是我的解法,供大家参考: --1.拆分字符串 create table test1 (number varchar(100)) insert into test1 values ('1,2,3,4,5,6') select --t.number, SUBSTRING(t.n...
分类:数据库   时间:2014-09-13 13:24:45    阅读次数:276
[LeetCode]Substring with Concatenation of All Words
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without an...
分类:其他好文   时间:2014-09-13 09:27:24    阅读次数:202
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!