码迷,mamicode.com
首页 >  
搜索关键字:longest consecutive    ( 3017个结果)
周刷题第二期总结(Longest Substring Without Repeating Characters and Median of Two Sorted Arrays)
这周前面刷题倒是蛮开心,后面出了很多别的事情和问题就去忙其他的,结果又只完成了最低目标。 Lonest Substring Without Repeating Characters: Given a string, find the length of the longest substring w ...
分类:其他好文   时间:2016-10-31 07:12:43    阅读次数:209
Wood Cut
二分查找的一个经典例子 非递减数列的二分查找 这个题,看起来很简单,可是仔细一看是含有重复值的非递减数组,那这个时候碰到target这个数字的时候就不能立刻返回了,那么这个时候需要继续在左半部分找更早出现的target。这个时候让end=mid-1, 并且把终止条件变成start<=end,这样如果 ...
分类:其他好文   时间:2016-10-31 06:58:36    阅读次数:173
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-31 00:43:28    阅读次数:212
URAL 1056 Computer Net(最短路)
Computer Net Time limit: 2.0 secondMemory limit: 64 MB Background Computer net is created by consecutive computer plug-up to one that has already been ...
分类:Web程序   时间:2016-10-29 11:49:06    阅读次数:208
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-10-29 07:51:49    阅读次数:226
Find the Longest Word in a String
找到提供的句子中最长的单词,并计算它的长度。 函数的返回值应该是一个数字。 主要考察 split() 和 sort() 的用法,注意倒序排列的方法,很常用,也很基础。 ...
分类:其他好文   时间:2016-10-27 00:18:52    阅读次数:165
leetcode 104 Maximum Depth of Binary Tree ----- java
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-26 13:07:52    阅读次数:156
[LeetCode] Longest Repeating Character Replacement 最长重复字符置换
Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the ...
分类:其他好文   时间:2016-10-26 09:40:13    阅读次数:431
POJ 3261 Milk Patterns 后缀数组求 一个串种 最长可重复子串重复至少k次
Milk Patterns Description Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation, he disc ...
分类:编程语言   时间:2016-10-26 00:14:31    阅读次数:224
409. Longest Palindrome
感觉需要注意的点就是在A-Z和a-z之间还夹了6个其他的字符,所以统计的时候不能用new int[52]需要new int[58] 代码; ...
分类:其他好文   时间:2016-10-25 14:35:48    阅读次数:163
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!