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 ...
分类:
其他好文 时间:
2016-03-08 20:59:12
阅读次数:
109
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any
分类:
其他好文 时间:
2016-03-08 07:05:03
阅读次数:
169
题目 最长无重复字符的子串给定一个字符串,请找出其中无重复字符的最长子字符串。 例如,在"abcabcbb"中,其无重复字符的最长子字符串是"abc",其长度为 3。 对于,"bbbbb",其无重复字符的最长子字符串为"b",长度为1。 解题 利用HashMap,map中不存在就一直加入,存在的时候
分类:
其他好文 时间:
2016-03-07 11:46:42
阅读次数:
190
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo
分类:
其他好文 时间:
2016-03-05 13:13:37
阅读次数:
137
以每个字符为中心,分两种情况向两边扩展。 manacher算法参见http://www.cnblogs.com/houkai/p/3371807.html AC代码: #include <string> #include <cstdio> #include <iostream> using name
分类:
其他好文 时间:
2016-03-02 16:31:42
阅读次数:
142
32. Longest Valid Parentheses Problem's Link ---------------------------------------------------------------------------- Mean: 给定一个由'('和')'组成的字符串,求最长
分类:
其他好文 时间:
2016-03-01 22:40:45
阅读次数:
207
给定两个字符串S和T.求出这两个字符串最长的公共子序列的长度. 输入: n=4 m=4 s="abcd" t="becd" 输出: 3("bcd") 这类问题被称为最长公共子序列问题(LCS,Longest Common Subsequence)的著名问题. max(dp[i][j]+1,dp[i]
分类:
其他好文 时间:
2016-03-01 20:41:23
阅读次数:
116
Longest Common Substring II Time Limit: 2000ms Memory Limit: 262144KB A string is finite sequence of characters over a non-empty finite set Σ. In this
分类:
其他好文 时间:
2016-02-29 10:39:33
阅读次数:
150
Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or do
分类:
其他好文 时间:
2016-02-29 01:55:30
阅读次数:
170
最长上升子序列问题 代码(C)本文地址: http://blog.csdn.net/caroline_wendy题目: 有一个长为n的数列a. 请求出这个序列中最长上升子序列的长度. 最长上升子序列的数字之间能够有间隔.即最长上升子序列(LIS, Longest Increasing Subsequ
分类:
编程语言 时间:
2016-02-28 09:51:56
阅读次数:
272