码迷,mamicode.com
首页 >  
搜索关键字:longest    ( 2697个结果
做几个leetcode数组题二
1.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 consecu...
分类:编程语言   时间:2014-11-19 22:27:00    阅读次数:447
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 for "abcabcbb" is "abc", which the length is 3. Fo...
分类:其他好文   时间:2014-11-19 01:35:20    阅读次数:199
LeetCode: Longest Common Prefix 解题报告
Longest Common Prefix Total Accepted: 24665 Total Submissions: 92370My SubmissionsQuestionSolutionWrite a function to find the longest common prefix s...
分类:其他好文   时间:2014-11-18 23:35:50    阅读次数:182
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...
分类:其他好文   时间:2014-11-17 22:29:25    阅读次数:242
TOJ 3517 The longest athletic track
3517.The longest athletic trackTime Limit:1.0 Seconds Memory Limit:65536KTotal Runs:880 Accepted Runs:342After a long time of algorithm training, we w...
分类:其他好文   时间:2014-11-17 11:59:05    阅读次数:270
POJ 2533-Longest Ordered Subsequence(DP)
Longest Ordered Subsequence Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 34454   Accepted: 15135 Description A numeric sequence of ai is ordered if a1 a2 ...
分类:其他好文   时间:2014-11-16 18:41:55    阅读次数:202
[leetcode] 8. 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...
分类:其他好文   时间:2014-11-15 21:31:17    阅读次数:194
Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.(每个字符串从0开始的公共部分即最长公共前缀)C++代码如下:#include#include#includeusing nam...
分类:其他好文   时间:2014-11-14 23:58:14    阅读次数:463
leetcode-longest palindromic substring-by 1337c0d3r
Given a string S, find the longest palindromic substring in S.Note:This is Part II of the article:Longest Palindromic Substring. Here, we describe an ...
分类:其他好文   时间:2014-11-12 21:05:22    阅读次数:345
486E - LIS of Sequence(LIS)
题意:给一个长度为n的序列,问每个数关于序列的LIS(longest increasing sequence)是什么角色。这里分了三种:           1、此数没有出现在任意一条LIS中           2、此数出现在至少一条但是不是全部的LIS中           3、此数出现在所有的LIS中 解法:nlgn的LIS算法可以求出以每个i位置结束的LIS长度up[i]。出现在L...
分类:其他好文   时间:2014-11-12 19:45:28    阅读次数:214
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!