Longest Palindromic Substring问题:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and th...
分类:
其他好文 时间:
2015-04-03 17:06:38
阅读次数:
112
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2015-04-03 11:10:45
阅读次数:
102
LeetCode #Longest Substring Without Repeating Characters#
折腾了一回,第一感觉就是没有感觉...这种没技巧的话暴力是不现实的..而后发现其实没有很好理解题目的意
思考过么?究竟什么是最长的子字符串
这里有个很要命的概念, 子字符串,别小看这家伙.是搞定题目的关键.
"abcduiwe" 这...
分类:
其他好文 时间:
2015-04-03 00:18:57
阅读次数:
115
Given a string containing just the characters '(' and ')',
find the length of the longest valid (well-formed) parentheses substring.
For "(()",
the longest valid parentheses substring is "()",
...
分类:
其他好文 时间:
2015-04-02 11:40:03
阅读次数:
114
题意:和最长滑雪路径一样, 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #define mod=1...
分类:
其他好文 时间:
2015-04-01 19:47:08
阅读次数:
142
题目:
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 longest palindromic substring.
思路:第一种思路,就是以某...
分类:
其他好文 时间:
2015-04-01 09:30:28
阅读次数:
115
题意:给定一个字符串,查找最长的子串的长度(没有重复字符)。原题来自:https://leetcode.com/problems/longest-substring-without-repeating-characters/分析:我自己的思路,和曾经做的求最长公共子串长度一样,不过那个是用二维数组,...
分类:
其他好文 时间:
2015-03-31 12:22:39
阅读次数:
106
最长公共子序列时间限制:3000ms | 内存限制:65535KB难度:3描述咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(Longest Common Subsequence)。其定义是,一个序列 ...
分类:
其他好文 时间:
2015-03-31 00:53:00
阅读次数:
102
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-03-30 22:49:58
阅读次数:
162
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 consecutive elements sequence is [1,
2,...
分类:
其他好文 时间:
2015-03-30 21:11:03
阅读次数:
115