一。HashMap1.HashMap构造函数public HashMap(int initialCapacity, float loadFactor) { if (initialCapacity MAXIMUM_CAPACITY) initialCapacity = MAXIM...
分类:
编程语言 时间:
2015-09-15 17:55:21
阅读次数:
204
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:
其他好文 时间:
2015-09-15 12:23:54
阅读次数:
165
需求:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest...
分类:
其他好文 时间:
2015-09-14 22:27:06
阅读次数:
156
题目: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-09-14 16:46:54
阅读次数:
101
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 le...
分类:
其他好文 时间:
2015-09-14 01:55:44
阅读次数:
139
Typical solution: convert it to Maximum Array problem.And here is my solution: O(n) by using Greedy strategy on this equation: sum[i..j] = sum[0..j] -...
分类:
其他好文 时间:
2015-09-13 14:33:22
阅读次数:
166
题目链接:codeforces 332B题目大意:给出一个序列,让找出不互相覆盖的两个长度为k的段,问在两个段的权值和最大的情况下,按照左边段的左端点排序,右边段的左端点作为第二关键字排序,得到的第一个答案。题目分析:
很水的数据结构的题目,我们只需要先利用前缀和预处理出所有长度为k的段的总权值。然后利用rmq维护区间最大值和得到这个最大值取得的段的最左位置。
然后我们枚举第二段的位置,然后找到在采...
分类:
其他好文 时间:
2015-09-12 21:53:08
阅读次数:
131
Here you will find information on how to tune Linux, Mac OSX, and FreeBSD hosts connected at speeds of 1Gbps or higher for maximum I/O performance for wide area network transfers.?Note that sever...
分类:
其他好文 时间:
2015-09-12 20:30:10
阅读次数:
273
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:
其他好文 时间:
2015-09-12 18:56:37
阅读次数:
164
方法一:在网页的中增加如下这段代码,可以让网页的宽度自动适应手机屏幕的宽度。width=device-width :#表示宽度是设备屏幕的宽度initial-scale=1.0 :#表示初始的缩放比例minimum-scale=0.5 :#表示最小的缩放比例maximum-scale=2.0 ...
分类:
移动开发 时间:
2015-09-12 16:03:46
阅读次数:
258