码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
[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-04-14 14:35:10    阅读次数:121
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 longes...
分类:其他好文   时间:2015-04-13 18:24:42    阅读次数:112
【栈】Longest Valid Parentheses
题目: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 l...
分类:其他好文   时间:2015-04-13 16:44:58    阅读次数:99
POJ 3693 Maximum repetition substring
刚开始一直WA,一直以为是自己往前延展的时候写错了,后来才发现是ST写错了 +-*/的优先级要比位运算优先级高,以后碰上不清楚优先级的运算一定要加括号 #include #include #include #include using namespace std; #define N 100010 char s[N]; int r[N],wa[N],wb[N],wv[N],ws[N],sa...
分类:其他好文   时间:2015-04-13 10:59:50    阅读次数:99
Minimum Window Substring -- leetcode
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). For example, S = "ADOBECODEBANC" T = "ABC" Minimum window is "BAN...
分类:Windows程序   时间:2015-04-13 09:42:33    阅读次数:201
Bash Shell read file line by line and substring
#read one file line by line for line in $(cat test1.txt); do echo $line ; done; #while read split line by space while read line do for word in $line d...
分类:系统相关   时间:2015-04-13 08:15:09    阅读次数:193
[*leetcode 30] 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 concatenati...
分类:其他好文   时间:2015-04-12 23:59:09    阅读次数:368
LeetCode5 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...
分类:其他好文   时间:2015-04-12 20:54:09    阅读次数:137
LeetCode the longest palindrome substring
回文检测,参考http://blog.csdn.net/feliciafay/article/details/16984031使用时间复杂度和空间复杂度相对较低的动态规划法来检测,具体的做法图一 偶数个回文字符情况图二 奇数个回文字符情况核心就是如果一个子串是回文,如果分别向回文左右侧扩展一个字符相...
分类:其他好文   时间:2015-04-12 20:52:05    阅读次数:125
Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.Analyse: 找一些序列的最长前缀子序列。 1 class Solution { 2 public: 3 strin...
分类:其他好文   时间:2015-04-12 16:09:54    阅读次数:110
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!