Common SubstringsTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 7605Accepted: 2524DescriptionA substring of a string T is defined as:T(i, k)...
分类:
其他好文 时间:
2015-01-10 22:12:08
阅读次数:
295
1812. Longest Common Substring IIProblem code: LCS2A string is finite sequence of characters over a non-empty finite set Σ.In this problem, Σ is the s...
分类:
其他好文 时间:
2015-01-09 22:06:32
阅读次数:
339
双指针思想,尾指针不断往后扫,当扫到有一个窗口包含了所有T的字符,然后再收缩头指针,直到不能再收缩为止。最后记录所有可能的情况中窗口最小的...
字符串:var s = "1,2,3,4,5,"目标:删除最后一个 ","方法:s=s.substring(0,s.Length-1);字符串:var s2 = "img/upload/123.jpg"目标:获取文件名(不包含后缀名)方法:s2=s2.substring(s2.lastIndexOf...
分类:
Web程序 时间:
2015-01-08 22:35:00
阅读次数:
478
JS随机字符串Math.random().toString(16).substring(2); //8位Math.random().toString(36).substring(2); //16位JS最大值和最小值Math.max.apply(Math, [1,2,3]) //3Math.min.a...
分类:
Web程序 时间:
2015-01-08 17:50:30
阅读次数:
162
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
分类:
其他好文 时间:
2015-01-08 13:09:06
阅读次数:
175
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:
其他好文 时间:
2015-01-07 23:40:19
阅读次数:
305
//设置url中参数值function setParam(param,value){ var query = location.search.substring(1); var p = new RegExp("(^|)" + param + "=([^&]*)(|$)"); if(...
分类:
Web程序 时间:
2015-01-07 21:56:30
阅读次数:
171
2){ session.setAttribute("PROCESSING_BIZ_ENTITY",bizSegment.substring(0,3)); } } UserSecurityContext userSecurityContex...
分类:
Web程序 时间:
2015-01-07 20:29:28
阅读次数:
414
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab",
Return
[
["aa","b"]...
分类:
编程语言 时间:
2015-01-07 18:54:40
阅读次数:
134