码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
[LeetCode] 5. Longest Palindromic Substring
...
分类:其他好文   时间:2016-08-05 11:45:53    阅读次数:140
删除部分字符使其变成回文串问题——最长公共子序列(LCS)问题
先要搞明白:最长公共子串和最长公共子序列的区别。 最长公共子串(Longest Common Substirng):连续 最长公共子序列(Longest Common Subsequence,LCS):不必连续 实在是汗颜,网上做一道题半天没进展: 给定一个字符串s,你可以从中删除一些字符,使得剩下 ...
分类:其他好文   时间:2016-08-05 00:57:05    阅读次数:134
Longest Increasing Subsequence
Longest Increasing Subsequence(LIS) 一个美丽的名字 非常经典的线性结构dp [朴素]:O(n^2) d(i)=max{0,d(j) :j<i&&a[j]<a[i]}+1 直接两个for [二分查找优化]:O(n^2) g(i):d值为i的最小的a 每次更新然后lo ...
分类:其他好文   时间:2016-08-05 00:49:46    阅读次数:150
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-08-04 23:02:10    阅读次数:242
使用 Nexus 搭建私服仓库时我犯的一个小错误
私服搭建好,啥都配置好了,纳闷的是 Repositories 中的 group 为何总是空值?我还反反复复删了又重建,结果还是一样,不经意间再看 Configuration 选项卡的内容,发现左右两个选项我弄反了:Ordered Group Repositories 里啥都木有,全部在 Availa ...
分类:其他好文   时间:2016-08-03 18:41:38    阅读次数:571
hdu_1403_Longest Common Substring(后缀数组的应用)
题目链接:hdu_1403_Longest Common Substring 题意: 给你两个字符串,然你找最长的公共子串 题解: 后缀数组的经典应用,要找两个字符串的公共子串,那么就相当于找两个串的后缀的最长公共前缀,我们将两个字符串拼接在一起,中间插一个特殊字符 然后我们考虑height数组,h ...
分类:编程语言   时间:2016-08-03 18:40:49    阅读次数:205
Binary Tree Right Side View
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. For exa ...
分类:其他好文   时间:2016-08-03 06:43:15    阅读次数:119
Longest Substring with At Most K Distinct Characters
Given a string, find the longest substring that contains only two unique characters. For example, given "abcbbbbcccbdddadacb", the longest substring t ...
分类:其他好文   时间:2016-08-03 01:34:19    阅读次数:193
leetcode 300. Longest Increasing Subsequence
Given an unsorted array of integers, find the length of longest increasing subsequence. For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest inc ...
分类:其他好文   时间:2016-08-02 13:18:43    阅读次数:127
【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 leng ...
分类:其他好文   时间:2016-08-02 06:35:36    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!