码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
求两个字符串最长公共子串
一.问题描述:最长公共子串(LCS-Longest Common Substring)LCS问题就是求两个字符串最长公共子串的问题。比如输入两个字符串"ilovechina"和“chinabest”的最长公共字符串有"china",它们的长度是5.二.解法解法就是用一个矩阵来记录两个字符串中所有位置...
分类:其他好文   时间:2015-05-12 01:21:18    阅读次数:108
JavaScript对象应用-字符串和图片对象
1.1 应用 String对象截取特定文字利用String 对象的charAt() 和 substring() 方法等,截取特定文字或字段文字显示在页面上 1 2 3 4 字符串对象应用实例 5 27 28 29 53 54 1.2 应用 Image 对象实现动画 1 ...
分类:编程语言   时间:2015-05-11 23:38:55    阅读次数:123
String和StringBuilder
String: str.length()、str.indexOf()、str.lastIndexOf()、 str.substring()、str.trim()、startsWith()、endsWith()、 str.toUpperCase()、toLowerCase() String.v...
分类:其他好文   时间:2015-05-11 19:32:36    阅读次数:135
Leetcode Longest Valid Parentheses
我的错误代码: 1 #include 2 3 using namespace std; 4 5 int longestValidParentheses(string s) 6 { 7 int i = 0; 8 int L = s.length(); 9 int j;10 ...
分类:其他好文   时间:2015-05-11 12:54:52    阅读次数:96
poj 3693 树状数组
链接:点我 1 /* 2 * POJ 3693 Maximum repetition substring 3 * 先穷举长度L,然后求长度为L的子串最多能连续出现多少次 4 * 既然长度为L的串重复出现,那么str[0],str[l],str[2*l]……中肯定有两个连续的出现在字符串...
分类:编程语言   时间:2015-05-11 12:50:50    阅读次数:169
Longest Valid Parentheses
Longest Valid Parentheses问题:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses sub...
分类:其他好文   时间:2015-05-11 12:27:10    阅读次数:110
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 ...
分类:其他好文   时间:2015-05-11 12:14:42    阅读次数:116
Minimum Window Substring
Minimum Window Substring问题:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n)...
分类:Windows程序   时间:2015-05-10 23:43:00    阅读次数:172
[LeetCode 3] Longest Substring Without Repeating Characters
https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length of the longest substring without repeati...
分类:其他好文   时间:2015-05-10 23:36:51    阅读次数:159
java字符串处理
String a;a=a+"222"+3333;a.length();返回字符串长度,字符个数a.charAt(int n);返回第n个字符a.toLowerCase();将a全变为小写a.toUpperCase();大写a.subString(int beginindex);从指定位置开始到后面截...
分类:编程语言   时间:2015-05-10 22:00:39    阅读次数:134
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!