码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果)
(leetcode)Longest Common Prefix
class Solution {public: string longestCommonPrefix(vector& strs) { int len = strs.size(); if(len == 0) return ""; string prefix = strs[0]; for(...
分类:其他好文   时间:2015-05-18 22:56:09    阅读次数:144
【LeetCode】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 for “abcabcbb” is “abc”, whic...
分类:其他好文   时间:2015-05-18 18:54:52    阅读次数:99
poj3017 dp+单调队列
http://poj.org/problem?id=3017 Description Given an integer sequence { an } of length N, you are to cut the sequence into several parts every one of which is a consecutive subsequence of the ori...
分类:其他好文   时间:2015-05-18 16:52:11    阅读次数:130
linux下vim和bash配置文件 源文件
1. ~/.vimrc "去掉讨厌的有关vi一致性模式,避免以前版本的一些bug和局限 set nocompatible set autoread " 文件修改之后自动载入 set completeopt=longest,menu " 自动完成 set history=1000 "记录历史的行数 s...
分类:系统相关   时间:2015-05-18 16:23:20    阅读次数:228
soj 4421 最长回文子序列
题意: 给你一个字符串,求该字符串的最长回文子序列长度。 解法: 以前做过连续最长回文子串的长度就是通过构造奇数偶数长度的来做,而本题是不连续。 注意到回文字符串的特点是从左边向右边看和从右边向左边看是一样的效果,那么就可以把目标字符串s导致后产生一个t,子串中如果t和s相同那么这个子串就是回文子串,那么就转化为这两个子串求LCS(longest common subsequent)的问题了。 我的...
分类:其他好文   时间:2015-05-17 13:46:04    阅读次数:123
【Maximum Depth of Binary Tree 】cpp
题目: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...
分类:其他好文   时间:2015-05-17 00:40:24    阅读次数:126
[LeetCode] Maximum Depth of Binary Tree
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 leaf node....
分类:其他好文   时间:2015-05-16 20:38:48    阅读次数:152
[LeetCode][JavaScript]Longest Valid Parentheses
https://leetcode.com/problems/longest-valid-parentheses/Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the leng...
分类:编程语言   时间:2015-05-16 18:21:36    阅读次数:289
题目1042:Coincidence
题目描述:Find a longest common subsequence of two strings.输入:First and second line of each input casecontain two strings of lowercase character a…z. There...
分类:其他好文   时间:2015-05-16 18:13:58    阅读次数:99
fzu 2059 并查集+离线处理
题意: There is a array contain N(1 Every query will be: 1 x : ask longest substring which every number no less than x 2 y x : change the A[y] to x. there are at most change 10 times. For each ask...
分类:其他好文   时间:2015-05-16 14:52:28    阅读次数:121
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!