Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-09-03 01:52:10
阅读次数:
287
题目:Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", t.....
分类:
其他好文 时间:
2015-09-02 20:42:12
阅读次数:
176
Description:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeatin...
分类:
其他好文 时间:
2015-09-02 17:20:56
阅读次数:
101
Description:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one uniqu...
分类:
其他好文 时间:
2015-09-02 15:57:57
阅读次数:
218
1. LISO (n^2):/* LIS(Longest Increasing Subsequence) 最长上升子序列 O (n ^ 2) 状态转移方程:dp[i] = max (dp[j]) + 1 (a[j] res; int i; for (i=pos[len]; ~fa[i]; i=fa....
分类:
其他好文 时间:
2015-09-02 13:43:44
阅读次数:
157
https://leetcode.com/problems/longest-palindromic-substring/manacher算法相关:http://blog.csdn.net/ywhorizen/article/details/6629268class Solution {public:...
分类:
编程语言 时间:
2015-09-01 21:33:57
阅读次数:
168
题意:问一个数字能被多少种连续的质数相加得到。解法:一开始没看见是连续的……SB了半天……后来打了个表……就这样吧代码:#include#include#include#include#include#include#include#include#include#include#include#i...
分类:
其他好文 时间:
2015-09-01 21:22:08
阅读次数:
216
https://leetcode.com/problems/longest-palindromic-substring/manacher算法:http://blog.csdn.net/ywhorizen/article/details/6629268string longestPalindrome(...
分类:
编程语言 时间:
2015-09-01 18:28:26
阅读次数:
131
Description:Write a function to find the longest common prefix string amongst an array of strings.(最长公共字串)Code:string merge(string&str1, string&str2) ...
分类:
其他好文 时间:
2015-09-01 12:25:02
阅读次数:
171
Longest Common Substring IITime Limit: 2000msMemory Limit: 262144KBThis problem will be judged onSPOJ. Original ID:LCS264-bit integer IO format:%lld J...
分类:
其他好文 时间:
2015-09-01 10:26:26
阅读次数:
219