码迷,mamicode.com
首页 >  
搜索关键字:longest    ( 2697个结果
LeetCode:Longest Substring Without Repeating Characters
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
LeetCode[Map]: Longest Consecutive Sequence
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
PAT1040. Longest Symmetric String
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
poj-2533 Longest Ordered Subsequence 【最长上升子序列】
题目链接: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
POJ 3764 The xor-longest Path ( 字典树应用—— 求连续段相异或最大最小的线性算法)(好题)
题意:已知:给出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)
[LeetCode] 005. Longest Palindromic Substring (Medium) (C++/Java/Python)...
分类:编程语言   时间:2015-02-28 00:18:42    阅读次数:226
LeetCode Longest Valid Parentheses
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)
[LeetCode] 003. Longest Substring Without Repeating Characters (Medium) (C++/Java/Python)...
分类:编程语言   时间:2015-02-27 13:34:22    阅读次数:207
[LeetCode] MaximumDepth of Binary Tree
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!