1 : 2: 详解: width-viewport:宽度; height-viewport:高度 initial-scale: 初始的缩放比例 minimum-scale:允许用户缩放到得最小比例 maximum-scale:允许用户缩放的最大比例 user-scala...
分类:
移动开发 时间:
2015-06-02 12:55:33
阅读次数:
143
Description
The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For example, the repetition number of "a...
分类:
编程语言 时间:
2015-06-01 22:36:06
阅读次数:
262
问题描述在一个无序的数组中,如果对其进行排序,然后扫描一遍有序数组,可以获得相邻两元素的最大差值,比如 {-1, 2, 4, 9},那么最大差值就是4和9之间,是5.
现在如果不对原始数组进行排序,有什么好的方案,来获取有序形式下的最大差值?
Given an unsorted array, find the maximum difference between the successive...
分类:
其他好文 时间:
2015-05-31 16:53:29
阅读次数:
109
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.
3
7 4
2 4 6
8 5 9 3
That is, 3 + 7 + 4 + 9 = 23.
Find th...
分类:
其他好文 时间:
2015-05-31 12:30:05
阅读次数:
115
题目: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...
分类:
其他好文 时间:
2015-05-30 18:13:22
阅读次数:
130
首先来看一下java中的基本类型,如下表:
Primitive type
Size
Minimum
Maximum
Wrapper type
boolean
—
—
—
Boolean
char
16-bit
...
分类:
编程语言 时间:
2015-05-30 14:56:28
阅读次数:
149
题目:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complet...
分类:
其他好文 时间:
2015-05-30 10:34:15
阅读次数:
98
//求小于N且n/phi(x)最大的n如果有多个,输出最小的
//phi(x) = x*(1-1/p1)*(1-1/p2)*(1-1/p3)....
//要使得x/phi(x) 最大,即使得(1-1/p1)*(1-1/p2)*(1-1/p3)....最小
//又p1, p2 , p3 , ....
//全为素数因子,所以可以对枚举所有素数因子乘积,
//打表后找小于等于n的数
#inc...
分类:
其他好文 时间:
2015-05-29 18:11:25
阅读次数:
102
public class Solution { public int maxProduct(int[] A) { if (A == null || A.length == 0) { return 0; } if (A.length ...
分类:
其他好文 时间:
2015-05-29 15:16:50
阅读次数:
96
ORA-01000: maximum open cursors exceeded这是oracle数据库游标溢出错误1,生成游标 创建Statement或者PreparedStatement对象,会使用一个游标2,数据库游标配置 进入sqlplus,执行 show parameter o...
分类:
其他好文 时间:
2015-05-29 15:14:14
阅读次数:
167