码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果
5_Longest Palindromic Substring(Manacher) --LeetCode
参考:https://www.felix021.com/blog/read.php?2040,https://segmentfault.com/a/1190000002991199 做了修改。 首先用一个非常巧妙的方式,将所有可能的奇数/偶数长度的回文子串都转换成了奇数长度:在每个字符的两边都插入一 ...
分类:其他好文   时间:2018-03-02 22:07:31    阅读次数:151
3_Longest Substring Without Repeating Characters -- LeetCode
C++解法一: 算法解读:1) 这里使用哈希的思想,把256个可能的字符都考虑在内,字符的ASCⅡ编码作为数组下标进行映射。如m[a]等价于m[97]。2) res其实是result的缩写,表示返回的最大无重复子串的长度,left表示当前正在判断的子串的起始位置。3) 进行一个for循环,当满足(m ...
分类:其他好文   时间:2018-03-01 20:03:43    阅读次数:153
[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 longes ...
分类:其他好文   时间:2018-03-01 17:06:59    阅读次数:169
LC.298.Binary Tree Longest Consecutive Sequence
https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/description/Given a binary tree, find the length of the longest consecutive seq... ...
分类:其他好文   时间:2018-03-01 11:38:14    阅读次数:142
Leetcode problems classified by company 题目按公司分类(Last updated: October 2, 2017)
Sorted by frequency of problems that appear in real interviews.Last updated: October 2, 2017Google (214)534 Design TinyURL388 Longest Absolute File Pa ...
分类:其他好文   时间:2018-02-27 10:24:36    阅读次数:388
LC.104. Maximum Depth of Binary Tree
https://leetcode.com/problems/maximum-depth-of-binary-tree/description/Given a binary tree, find its maximum depth.The maximum depth is the number of ... ...
分类:其他好文   时间:2018-02-27 10:23:20    阅读次数:189
LeetCode Problems List 题目汇总
No. Title Level Rate 1 Two Sum Medium 17.70% 2 Add Two Numbers Medium 21.10% 3 Longest Substring Without Repeating Characters Medium 20.60% 4 Median o... ...
分类:其他好文   时间:2018-02-27 10:20:26    阅读次数:240
[LeetCode] 3.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 l ...
分类:其他好文   时间:2018-02-26 11:20:07    阅读次数:187
32. Longest Valid Parentheses(最长括号匹配,hard)
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo ...
分类:其他好文   时间:2018-02-25 19:13:20    阅读次数:143
Manacher’s Algorithm
最长的回文字符串第二部分 原文为英文页面,地址:https://articles.leetcode.com/longest-palindromic-substring-part-ii/ 给定一个字符串S,找到S中最长的回文子字符串。 注意:这是文章的第二部分:最长回文子串。在这里,我们描述了一个算法 ...
分类:其他好文   时间:2018-02-23 20:43:57    阅读次数:217
3017条   上一页 1 ... 78 79 80 81 82 ... 302 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!