码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
leetcode: longest substring without repeating characters
July 16, 2015Problem statement:Longest Substring Without Repeating CharactersRead the blog:http://blog.csdn.net/fightforyourdream/article/details/1786...
分类:其他好文   时间:2015-07-30 14:52:05    阅读次数:109
Longest Common Subsequence Problem
Thelongest common subsequence(LCS)problemis the problem of finding the longestsubsequencecommon to all sequences in a set of sequences (often just two...
分类:其他好文   时间:2015-07-30 07:10:57    阅读次数:120
CodeForces 5C Longest Regular Bracket Sequence
题意:给定一串括号,求最长的规则('(())'或‘(()())’)的字串及最长字串的个数;思路:使用栈保存左括号,与最近的右括号匹配,使用递推推出每个位置最长字串长度;#include#include#include#include#includeusing namespace std;stack ...
分类:其他好文   时间:2015-07-29 21:05:20    阅读次数:91
从文件路径中获取文件名的方法
//根据文件路径截取文件名 publicStringgetfileName(Strings)throwsException{ s.trim(); StringfileName=s.substring(s.lastIndexOf("/")+1); //或者 StringfileName=s.substring(s.lastIndexOf("\\")+1); System.out.println("fileName="+fileName); returnfileName; }参考..
分类:其他好文   时间:2015-07-29 19:42:57    阅读次数:97
[LeetCode][Java] Longest Consecutive Sequence
题目: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is...
分类:编程语言   时间:2015-07-29 19:30:05    阅读次数:91
利用javascript实现文本的自动输出
主要利用了setTimeout(),递归和String.substring();做出的效果就像是有一个打字员在打字. 1 2 3 4 5 6 7 8 9 Document10 11 12 文本自动输出13 14 15 16...
分类:编程语言   时间:2015-07-29 19:07:46    阅读次数:140
LeetCode 5_Longest Palindromic Substring
LeetCode 5_Longest Palindromic Substring  题目描述: 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 ...
分类:其他好文   时间:2015-07-29 15:57:00    阅读次数:131
javascript字符串函数
substring() 从字符串中提取一些字符var str="Hello world!"document.write(str.substring(3))stringObject.replace(regexp/substr,replacement)var str="Visit Microsoft!"...
分类:编程语言   时间:2015-07-29 15:33:42    阅读次数:143
Java替换字符或十进制数的字符串
如今,这个项目的需求:将“甲状腺结节 5*3 cm” 更换 “甲状腺结节 * cm”。在一个字符串的数字来替换空白。码,如以下: public static String subString(String str) { String regex = "\\d*"; Pattern p = Pa...
分类:编程语言   时间:2015-07-28 22:41:12    阅读次数:143
JS通过身份证号码获取出生年月日
这里我们讲述一下关于jq根据身份证号码计算出生日期、年龄、性别,有需要的同学可参考一下。代码如下复制代码//获取输入身份证号码 var UUserCard = $("#UUserCard").val(); //获取出生日期 //UUserCard.substring(6, 10) + "-" + U...
分类:Web程序   时间:2015-07-28 17:36:04    阅读次数:186
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!