码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果)
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 ...
分类:其他好文   时间:2016-10-14 00:31:17    阅读次数:185
SPOJ 1811 Longest Common Substring
Description 给出两个字符串,求最长公共子串. Sol SAM. 这题随便做啊...后缀数组/Hash+二分都可以. SAM就是模板啊...直接在SAM上跑就行,没有了 \(go[w]\) 就往 \(par\) 跳. 每走一步统计一下答案. Code ...
分类:其他好文   时间:2016-10-12 22:21:56    阅读次数:137
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 l ...
分类:其他好文   时间:2016-10-12 13:30:49    阅读次数:113
UVA10285 Longest Run on a Snowboard
题解: 记忆化搜索入门题 代码: ...
分类:其他好文   时间:2016-10-12 11:13:44    阅读次数:114
298. Binary Tree Longest Consecutive Sequence
Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence of nodes from some starting node to any ...
分类:其他好文   时间:2016-10-12 11:13:32    阅读次数:141
No.014:Longest Common Prefix
题目: Write a function to find the longest common prefix string amongst an array of strings. 官方难度: Easy 翻译: 写一个函数,用来寻找一个字符串数组中的最长公共前缀。 思路: 1. 长度为0的数组直接退 ...
分类:其他好文   时间:2016-10-12 10:51:29    阅读次数:122
zip、izip、izip_longest的区别
昨儿,小爷在LeetCode上刷了一道题,关于把两个字符串型的整数加和的问题(当然不能直接强转),链接在这https://leetcode.com/problems/add-strings/,感兴趣的朋友们可以一试,不难,只要想做肯定做得出,无非就是要想想进位和哪个字符串位数多的问题,提交几次考虑的 ...
分类:其他好文   时间:2016-10-10 19:12:12    阅读次数:151
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 leng ...
分类:其他好文   时间:2016-10-10 07:44:45    阅读次数:166
最长公共子序列练习
最长公共子串(Longest Common Substirng)和最长公共子序列(Longest Common Subsequence,LCS)的区别为:子串是串的一个连续的部分,子序列则是从不改变序列的顺序,而从序列中去掉任意的元素而获得新的序列;也就是 说,子串中字符的位置必须是连续的,子序列则 ...
分类:其他好文   时间:2016-10-09 23:13:22    阅读次数:158
【leedcode】longest-substring-without-repeating-characters
寻找最长的不重复串,略像滑动窗口。 上面这个粗鲁的代码,马马虎虎毕竟打败51 ~61%的code,lastIndexOf有优化的空间。 不过答案真是美妙的活动窗口实现,赞!使用了字符作为坐标,索引作为值。 ...
分类:其他好文   时间:2016-10-08 18:48:59    阅读次数:112
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!