码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
POJ 2533-Longest Ordered Subsequence(dp_最长上升子序列)
Longest Ordered Subsequence Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 35502   Accepted: 15572 Description A numeric sequence of ai is ordered if a1...
分类:其他好文   时间:2015-02-02 23:14:01    阅读次数:274
LeetCode --- 30. Substring with Concatenation of All Words
题目链接: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 concatena...
分类:其他好文   时间:2015-02-02 23:09:55    阅读次数:253
C#几个经常用到的字符串截取
一、1、取字符串的前i个字符(1)string str1=str.Substring(0,i);(2)string str1=str.Remove(i,str.Length-i);2、去掉字符串的前i个字符string str1=str.Remove(0,i);string str1=str.Sub...
分类:Windows程序   时间:2015-02-02 19:37:00    阅读次数:207
Leetcode Longest Valid Parentheses
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:其他好文   时间:2015-02-02 14:03:33    阅读次数:101
[LeetCode]Longest Substring Without Repeating Characters
Q: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....
分类:其他好文   时间:2015-02-01 19:13:07    阅读次数:163
Longest Palindromic Substring
求解回文字符串:这道题是查找资料才得到的解法。具体思路如下:比如对字符串abcba,做如下处理#a#b#c#b#a#,目的是消除偶数的回文。计算一点的回文长度时,根据保存的前端的最大回文长度和中心点,判断当前点应该是从0开始计算,还是可以根据利用以前的结果。主要就是这个思路。class Soluti...
分类:其他好文   时间:2015-02-01 13:27:48    阅读次数:173
[Leetcode][Python]32: Longest Valid Parentheses
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'32: Longest Valid Parentheseshttps://oj.leetcode.com/problems/longest-valid-parentheses/Gi...
分类:编程语言   时间:2015-02-01 01:52:20    阅读次数:319
NYOJ 36 &&HDU 1159 最长公共子序列(经典)
链接:click here 题意:tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(Longest Common Subsequence)。其定义是,一个序列 S ,如果分别是两个或多个已知序列的子序列,且是所有符合此条件序列中最长的,则 S 称为已知序列的最长公共子序列。 输入第一行给出一个整数N(0 接下来每组数据两行,分别为待测的两组字符串。每个字符串长度不大于...
分类:其他好文   时间:2015-01-31 23:19:56    阅读次数:323
UVa 10285 Longest Run on a Snowboard
这题我的第一感觉就是用DFS。自己写的貌似不够完美,因为我看见别人的时间都特别的短,而我的有点长。 #include #include #include #include #include #include using namespace std; const int N=102; int height[N][N]; bool visited[N][N]; int dx[]={1,0,-1,0}...
分类:其他好文   时间:2015-01-31 21:53:26    阅读次数:220
javascript常用的内置对象实用操作
1.indexOf() 方法 -----这个方法比较常用返回某个指定的字符串值在字符串中首次出现的位置使用格式:stringObject.indexOf(substring, startpos)举个例子:寻找第二个o所在的位子var mystr="Hello World!" document.wri...
分类:编程语言   时间:2015-01-31 17:41:50    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!