码迷,mamicode.com
首页 >  
搜索关键字:longest    ( 2697个结果
leetcode_14题——Longest Common Prefix(字符串)
Longest Common PrefixTotal Accepted:44093Total Submissions:169565My SubmissionsQuestionSolutionWrite a function to find the longest common prefix stri...
分类:其他好文   时间:2015-04-26 12:09:13    阅读次数:103
Leetcode 解题 Longest Substring without repeating charcater python
原题:Given a string, find the length of the longest substring without repeating characterFor example, the Longest substring without repeating letters fo...
分类:编程语言   时间:2015-04-25 22:41:48    阅读次数:229
LeetCode 14 Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.这题是寻找一组字符串的最长公共前缀,举个例子:“abc” "a"显然lPrefixString = "a",注意检查空串的情况!...
分类:其他好文   时间:2015-04-25 19:48:20    阅读次数:114
Java [leetcode 5] 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 l...
分类:编程语言   时间:2015-04-25 14:54:13    阅读次数:145
Java [leetcode 3] 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 lette...
分类:编程语言   时间:2015-04-25 14:50:46    阅读次数:131
Java for LeetCode 005 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 longes...
分类:编程语言   时间:2015-04-25 12:09:43    阅读次数:158
Longest Substring with At Most Two Distinct Characters
Given a string S, find the length of the longest substring T that contains at most two distinct characters.Given S = “eceba”,T is “ece” which its leng...
分类:其他好文   时间:2015-04-24 07:48:35    阅读次数:109
Java for 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-04-23 23:22:16    阅读次数:203
[LeetCode]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 longest valid parentheses substring is “()”, which h...
分类:其他好文   时间:2015-04-23 21:49:15    阅读次数:156
LeetCode 14 Longest Common Prefix 最长前缀
题目:Write a function to find the longest common prefix string amongst an array of strings. 翻译:求一个字符串数组中 共同的最长前缀。 思路:以第一个串为基准,逐个位置遍历,并遍历字符串数组,如果出现某个字符串长度小于当前位置,或者出现当前位置的字符不相同,返回字串strs[0].substring(0,p...
分类:其他好文   时间:2015-04-23 11:05:31    阅读次数:108
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!