码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果)
leetcode 329. Longest Increasing Path in a Matrix
Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or do ...
分类:其他好文   时间:2016-04-29 14:21:49    阅读次数:194
LeetCode #329. Longest Increasing Path in a Matrix
题目 Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or... ...
分类:其他好文   时间:2016-04-28 19:54:32    阅读次数:143
LeetCode : 5. Longest Palindromic Substring
...
分类:其他好文   时间:2016-04-28 11:58:25    阅读次数:225
LeetCode OJ 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-04-25 20:55:00    阅读次数:129
LeetCode 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 roo ...
分类:其他好文   时间:2016-04-25 00:37:34    阅读次数:142
n个整数中,找出尽可能多的数使他们组成一个等差数列,求最长等差数列的长度
例子: 3,8,4,5,6,2 返回值应该为 :5 这是昨天做的一道优酷土豆的编程题,和leetcode中的128/ Longest Consecutive Sequence 有点相似,但是leetcode题的公差是确定的1,而这道题的公差是不确定的。 本人的写出的是一种通过穷举的方法实现查找最长等 ...
分类:其他好文   时间:2016-04-24 20:07:44    阅读次数:722
Leetcode 详解(Substing without repeats character)
Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng ...
分类:其他好文   时间:2016-04-23 11:33:14    阅读次数:209
POJ_2739_Sum_of_Consecutive_Prime_Numbers
描述 多次询问,对于一个给定的n,求有多少组连续的素数,满足连续素数之和为n. 分析 尺取法. 打个素数表,对于每一个n,尺取之. 换了种尺取法的写法= =. 1 #include<cstdio> 2 3 const int maxn=10005; 4 int p,n; 5 int prime[ma ...
分类:其他好文   时间:2016-04-23 10:27:57    阅读次数:187
[经典] 回文问题(三)
Longest Palindromic Substring 最长回文子串 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 100 ...
分类:其他好文   时间:2016-04-22 18:25:01    阅读次数:147
159. Longest Substring with At Most Two Distinct Characters
Given a string, find the length of the longest substring T that contains at most 2 distinct characters. For example, Given s = “eceba”, T is "ece" whi ...
分类:其他好文   时间:2016-04-22 13:24:06    阅读次数:159
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!