这周前面刷题倒是蛮开心,后面出了很多别的事情和问题就去忙其他的,结果又只完成了最低目标。 Lonest Substring Without Repeating Characters: Given a string, find the length of the longest substring w ...
分类:
其他好文 时间:
2016-10-31 07:12:43
阅读次数:
209
二分查找的一个经典例子 非递减数列的二分查找 这个题,看起来很简单,可是仔细一看是含有重复值的非递减数组,那这个时候碰到target这个数字的时候就不能立刻返回了,那么这个时候需要继续在左半部分找更早出现的target。这个时候让end=mid-1, 并且把终止条件变成start<=end,这样如果 ...
分类:
其他好文 时间:
2016-10-31 06:58:36
阅读次数:
173
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
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
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
找到提供的句子中最长的单词,并计算它的长度。 函数的返回值应该是一个数字。 主要考察 split() 和 sort() 的用法,注意倒序排列的方法,很常用,也很基础。 ...
分类:
其他好文 时间:
2016-10-27 00:18:52
阅读次数:
165
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
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
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
感觉需要注意的点就是在A-Z和a-z之间还夹了6个其他的字符,所以统计的时候不能用new int[52]需要new int[58] 代码; ...
分类:
其他好文 时间:
2016-10-25 14:35:48
阅读次数:
163