题目:
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,...
分类:
其他好文 时间:
2015-11-04 11:32:42
阅读次数:
181
QuestionGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the...
分类:
其他好文 时间:
2015-11-04 09:23:02
阅读次数:
136
QuestionGiven a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique lo...
分类:
其他好文 时间:
2015-11-04 01:56:54
阅读次数:
182
A typical O(n^2) solution uses dynamic programming. Let's use lens[j] to denote the length of the LIS ending with nums[j]. The state equations arelens...
分类:
其他好文 时间:
2015-11-03 23:00:50
阅读次数:
240
题目描述:Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", th...
分类:
编程语言 时间:
2015-11-03 22:42:46
阅读次数:
183
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-11-02 00:00:09
阅读次数:
277
题目:Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the ...
分类:
其他好文 时间:
2015-11-01 21:02:38
阅读次数:
195
输出一个目录中的内容(listFiles): public void testListFiles() { File dir = new File("."); File[] subs = dir.listFiles(); for(File sub:...
分类:
编程语言 时间:
2015-11-01 13:58:03
阅读次数:
198
题目链接:https://leetcode.com/problems/longest-palindromic-substring/输出最长的回文串 1 class Solution { 2 public: 3 int pre[22222]; 4 char x[22222]; 5 ...
分类:
其他好文 时间:
2015-10-31 17:14:56
阅读次数:
182
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2015-10-31 14:19:03
阅读次数:
109