码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
LeetCode 3 Longest Substring Without Repeating Characters
Given a string,find the length of the longest substring without repeating characters. Forexample, the longest substring without repeating letters for"abcabcbb" is "abc", which the length is 3. For"bbb...
分类:其他好文   时间:2015-07-21 12:54:53    阅读次数:84
Section 2.3 蔓延感
Longest Prefix给定一堆小字符串,问最长可以组成给定的大字符串的多少位前缀。类似于DP的思想,标记出结束位置。看最远结束在哪里。#include using namespace std;const int N = 1205;const int M = 200004;string ch.....
分类:其他好文   时间:2015-07-21 06:42:05    阅读次数:94
[leedcode 104] 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 le...
分类:其他好文   时间:2015-07-20 23:00:05    阅读次数:85
HDU - 3530 Subsequence
DescriptionThere is a sequence of integers. Your task is to find the longest subsequence that satisfies the following condition: the difference betwee...
分类:其他好文   时间:2015-07-20 12:21:06    阅读次数:82
【LeetCode-面试算法经典-Java实现】【014-Longest Common Prefix(最长公共前缀)】
【014-Longest Common Prefix(最长公共前缀)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Write a function to find the longest common prefix string amongst an array of strings. 题目大意  写一个函数找出一个字串所数组中的最长的公共前缀。 解题思路  第一...
分类:编程语言   时间:2015-07-20 09:18:51    阅读次数:183
[LeetCode] Longest Palindrome Substring 具体分析
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2015-07-19 10:00:25    阅读次数:125
LeetCode.003 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-07-18 21:14:22    阅读次数:120
Throwing cards away I uva1594
?? Throwing cards away I Given is an ordered deck of  n  cards numbered 1 to  n  with card 1 at the top and card  n  at the bottom. The following operation is performed as long as there are at ...
分类:Windows程序   时间:2015-07-18 11:07:16    阅读次数:167
[Leetcode]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 ...
分类:其他好文   时间:2015-07-18 00:24:41    阅读次数:147
LeetCode之LCP(Longest Common Prefix)问题
这个也是简单题目,但是关键在于题意的理解。 题目原文就一句话:Write a function to find the longest common prefix string amongst an array of strings. 题意是给一个字符串数组,找出这个字符串数组中所有字符串的最长公共前缀。 注意是限定的前缀,而不是子串。...
分类:其他好文   时间:2015-07-17 22:53:11    阅读次数:134
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!