Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-03-02 18:25:51
阅读次数:
154
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-02 14:57:06
阅读次数:
136
Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest sym...
分类:
其他好文 时间:
2015-03-02 09:29:08
阅读次数:
123
题目链接:http://poj.org/problem?id=2533
Longest Ordered Subsequence
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 35929
Accepted: 15778
Description
A ...
分类:
其他好文 时间:
2015-03-01 18:33:22
阅读次数:
171
题意:已知:给出n个结点的树,定义:两结点间的权值为两点之间所有边相异或的值.求:树中的某两点间的最大权值.
思路:先说简单一点的题:有道CowXor,是一串线性序列,求某连续段异或的最大值,这题的思路是先求前i项序列相异或的值Si,所以x到y的连续异或就是Sx^Sy ,因为a^b = (a ^ c) ^ (b ^ c).
这题同样是这个思路把线性拓展到树上,先求任何点到某一定点的连续...
分类:
编程语言 时间:
2015-03-01 13:17:12
阅读次数:
160
[LeetCode] 005. Longest Palindromic Substring (Medium) (C++/Java/Python)...
分类:
编程语言 时间:
2015-02-28 00:18:42
阅读次数:
226
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-02-27 21:37:53
阅读次数:
138
最长公共子序列
时间限制:3000 ms | 内存限制:65535 KB
难度:3
描述咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。
tip:最长公共子序列也称作最长公共子串(不要求连续),英文缩写为LCS(Longest Common Subsequence)。其定义是,一个序列 S ,如果分别是两个或多个已知序列的子序列,且是所有符合...
分类:
其他好文 时间:
2015-02-27 17:09:36
阅读次数:
160
[LeetCode] 003. Longest Substring Without Repeating Characters (Medium) (C++/Java/Python)...
分类:
编程语言 时间:
2015-02-27 13:34:22
阅读次数:
207
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...
分类:
其他好文 时间:
2015-02-26 21:32:39
阅读次数:
152