Longest Ordered SubsequenceDescriptionA numeric sequence of ai is ordered if a1 File Name: poj2533.cpp 3 > Author: Enumz 4 > Mail: 369372123@...
分类:
其他好文 时间:
2014-10-30 16:56:36
阅读次数:
164
# 题目 > 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 sequenc...
分类:
其他好文 时间:
2014-10-30 12:01:47
阅读次数:
221
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For ...
分类:
其他好文 时间:
2014-10-30 11:46:27
阅读次数:
188
H -LISTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionA numeric sequence ofaiis ordered ifa1<a2< ... <aN. Let...
分类:
其他好文 时间:
2014-10-28 23:49:45
阅读次数:
261
1, 思考过程比较慢,加强锻炼2,空字符串的定义,不能用null3,数组的长度为array.length,而string的长度为函数 string.length()public class Solution { public String longestCommonPrefix(String[...
分类:
其他好文 时间:
2014-10-27 12:37:47
阅读次数:
246
DP、KMP什么的都太高大上了,自己想了个朴素的遍历方法。
【题目】
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 palin...
分类:
其他好文 时间:
2014-10-26 15:37:32
阅读次数:
249
【题意】
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is...
分类:
其他好文 时间:
2014-10-26 11:49:53
阅读次数:
203
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 "()",
...
分类:
其他好文 时间:
2014-10-26 11:49:43
阅读次数:
185
Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, ...
分类:
其他好文 时间:
2014-10-26 11:40:45
阅读次数:
111
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-10-26 07:58:51
阅读次数:
161