码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
[leetcode 14]Longest Common Prfix
1 题目:Write a function to find the longest common prefix string amongst an array of strings.Hide TagsString2 思路所有字符串公共的前缀,那么第一个字符串肯定包括了。 从第一个字符串开始遍历着手即...
分类:其他好文   时间:2015-06-14 16:26:59    阅读次数:102
[Algorithms] Longest Common Subsequence
The Longest Common Subsequence (LCS) problem is as follows:Given two sequences s andt, find the length of the longest sequence r, which is a subsequen...
分类:其他好文   时间:2015-06-14 00:30:15    阅读次数:177
[Algorithms] Longest Common Substring
The Longest Common Substring (LCS) problem is as follows:Given two strings s and t, find the length of the longest string r, which is a substring of b...
分类:其他好文   时间:2015-06-13 23:04:33    阅读次数:120
[LeetCode] Longest Valid Parentheses
This problem is a nice extension of the Valid Parentheses problem.There are several ways to solve it. The first idea is also to use a stack. However, ...
分类:其他好文   时间:2015-06-13 16:56:41    阅读次数:130
LeetCode之“动态规划”:Longest Valid Parentheses
题目链接 题目要求: Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring. For...
分类:其他好文   时间:2015-06-12 23:52:34    阅读次数:120
Longest Palindromic Substring
1. Question求最长回文子串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...
分类:其他好文   时间:2015-06-12 23:49:08    阅读次数:228
leetcode之Maximum Depth of Binary Tree 以及Balanced 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-06-12 23:40:02    阅读次数:121
[LeetCode] Longest Substring with At Most Two Distinct Characters
Problem Description:Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s =“eceb...
分类:其他好文   时间:2015-06-12 22:04:43    阅读次数:103
[LeetCode] Longest Consecutive Sequence
This problem is not very intuitive at first glance. However, the final idea should be very self-explanatory. You visit each element in nums, and then ...
分类:其他好文   时间:2015-06-12 19:10:09    阅读次数:103
Longest Substring Without Repeating Characters
1. Question求最长无重复字符子串。Given a string, find the length of the longest substring without repeating characters. For example, the longest substring withou...
分类:其他好文   时间:2015-06-12 16:48:13    阅读次数:118
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!