[Description] Given a string, find the largest unique substring.e.g. str[] = "asdfghjkkjhgf"; sub[] = "asd";[Thought] create an auxiliary space 'r...
分类:
其他好文 时间:
2014-11-09 11:13:04
阅读次数:
142
偶然看到了“Fotolog: Scaling the World\'s Largest Photo Blogging Community”,才发现很多数据库的优化其实道理都很简单,至高境界是当你面对问题时,是否真正做出了自己的思考,而不仅仅只是经验主义的惯性使然:本文案例背景介绍:一个图片网站,每张...
分类:
数据库 时间:
2014-11-09 08:35:43
阅读次数:
157
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:
其他好文 时间:
2014-11-08 16:45:18
阅读次数:
111
#题目 > 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 contiguous subarray [2,3] has the ...
分类:
其他好文 时间:
2014-11-08 10:36:12
阅读次数:
201
题意 给n个条形的高度, 问能放的最大矩形面积分析: 从左到右 从右到左 各搞一遍分别记录 L[i]记录列(从前往后)标 第几列开始 可以往后放高度为a[i]的矩形 R[i]记录列(从后往前)标 第几列开始 可以往前放高度为a[i]的矩形R[i]-L[i]+1即为高度为a[i]的矩形能...
分类:
其他好文 时间:
2014-11-08 10:27:39
阅读次数:
181
Problem DescriptionFor this problem, you will write a program that prints theNthlargest value in a fixed sized array of integers. To make things simpl...
分类:
其他好文 时间:
2014-11-06 21:45:05
阅读次数:
177
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],t...
分类:
其他好文 时间:
2014-11-05 22:59:32
阅读次数:
228
参数数量可变的方法public static double max(double... values)//double...是一个数据类型,对于实现者来说,double...与double[]完全一样{ double largest = Double.MIN_VALUE; for(...
分类:
其他好文 时间:
2014-11-05 19:03:18
阅读次数:
160
题目大意:有个字母矩阵,包含字母"a、b、c、w、x、y、z",其中,w能变为"a、b",
x能变为"b、c",y能变为"a、c",z能变为"a、b、c"。问能构成的最大字母完全一样的子
矩阵面积为多大?
思路:和HDU1505、HDU1506一样的思路,其中a[i][j]表示转换为字母a后以第i行为底,
第j列上方连续空闲位置的高度。b[i][j]表示字母b……,c[i][j]表示字母c……
遍历计算出该点向左右两边延伸的左右边界,从而计算出面积,最终比较计算出最大面积。...
分类:
其他好文 时间:
2014-11-04 17:20:19
阅读次数:
230
题目描述:
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 contiguous subarray [2,3] has t...
分类:
其他好文 时间:
2014-11-03 22:35:55
阅读次数:
168