码迷,mamicode.com
首页 >  
搜索关键字:longest    ( 2697个结果
【Longest Consecutive Sequence】cpp
题目: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 longe...
分类:其他好文   时间:2015-04-17 23:40:26    阅读次数:127
POJ 2533 Longest Ordered Subsequence (DP最长上升子序列)
题目的大意是:给出一序列,求出该序列的最长上升子序列的最大长度。 思路: a: 1 7 3 5 9 4 8 dp: 1 2 2 3 4 3 4 #include #include using namespace std; const int MAXN = 1005; int main() { int n; while( cin>>n ) {...
分类:其他好文   时间:2015-04-17 22:19:25    阅读次数:169
nyoj 308 Substring
Substring 时间限制:1000 ms  |  内存限制:65535 KB 难度:1 描述 You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substring of ...
分类:其他好文   时间:2015-04-17 18:24:31    阅读次数:128
32. Longest Valid Parentheses
题目:Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the long...
分类:其他好文   时间:2015-04-17 17:52:17    阅读次数:118
[LeetCode] Longest Palindromic Substring
Longest Palindromic Substring 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 palindrom...
分类:其他好文   时间:2015-04-17 13:55:59    阅读次数:162
[LeetCode] Longest Substring Without Repeating Characters
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 ...
分类:其他好文   时间:2015-04-16 21:54:27    阅读次数:126
[LeetCode] Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. 1 class Solution { 2 public: 3 string longestCommonPrefix(v...
分类:其他好文   时间:2015-04-16 21:20:24    阅读次数:116
[Leet code 3]Longest Substring Without Repeating Characters
1 题目Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter...
分类:其他好文   时间:2015-04-16 19:19:32    阅读次数:100
LeetCode --- 104. Maximum Depth of Binary Tree
题目链接:Maximum Depth 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 leaf node. 这道题...
分类:其他好文   时间:2015-04-16 10:25:57    阅读次数:123
POJ 2355(LIS)
A -Longest Ordered SubsequenceTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusPracticePOJ 2533DescriptionA numeric seque...
分类:其他好文   时间:2015-04-16 01:25:20    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!