码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果
LeetCode-Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. Example: Given "abcabcbb", the answer is "abc", which the lengt ...
分类:其他好文   时间:2018-04-11 16:13:06    阅读次数:131
516. Longest Palindromic Subsequence
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. 判断字符串中最长的回文子串,子串不一定要连续。 ...
分类:其他好文   时间:2018-04-06 16:02:40    阅读次数:193
Leetcode--Longest Palindromic Substring(0005)
转载请注明:http://www.cnblogs.com/igoslly/p/8726771.html 来看一下题目: Given a string s, find the longest palindromic substring in s. You may assume that the max ...
分类:其他好文   时间:2018-04-06 10:57:44    阅读次数:209
Longest Substring Without Repeating Characters
求最长不重复子字符串 题目来源: https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given "abcabcbb", the answer is "abc", which the length ...
分类:其他好文   时间:2018-04-05 20:01:29    阅读次数:171
[LeetCode] 128. 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 longes ...
分类:其他好文   时间:2018-04-02 13:45:30    阅读次数:168
Leetcode3---Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:其他好文   时间:2018-03-31 20:41:46    阅读次数:130
最长公共子串与最长公共子序列
两者的区别: 最长公共子串(Longest Common Substirng)和最长公共子序列(Longest Common Subsequence,LCS)的区别为:子串是串的一个连续的部分,子序列则是从不改变序列的顺序,而从序列中去掉任意的元素而获得新的序列;也就是说,子串中字符的位置必须是连续 ...
分类:其他好文   时间:2018-03-30 21:47:04    阅读次数:167
LeetCode 32. Longest Valid Parentheses
问题链接 "LeetCode 32. Longest Valid Parentheses" 题目解析 给出只包含左右括号的字符串,返回最长的括号匹配字符串长度。 解题思路 括号匹配问题一般借助 栈 ,便于理解。定义 $start$ 记录合法字符串的起始位置,遍历字符串: 当遇到左括号,则把其索引压入 ...
分类:其他好文   时间:2018-03-29 21:22:32    阅读次数:154
485. Max Consecutive Ones
原题链接: "https://leetcode.com/problems/max consecutive ones/description/" 这道题目级别为easy,实际做起来也是so easy: ...
分类:其他好文   时间:2018-03-25 19:23:52    阅读次数:138
【LeetCode】014. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. 题解: 简单的暴力遍历解决 ...
分类:其他好文   时间:2018-03-25 18:17:51    阅读次数:131
3017条   上一页 1 ... 75 76 77 78 79 ... 302 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!