width - viewport的宽度 height - viewport的高度initial-scale - 初始的缩放比例minimum-scale - 允许用户缩放到的最小比例maximum-scale - 允许用户缩放到的最大比例user-scalable - 用户是否可以手动缩放
分类:
移动开发 时间:
2014-12-18 21:52:54
阅读次数:
408
和上题一样,这里要求可以重复数字。那么需要考虑的就比较多一步了。如果中间的值和左边的值相等的话,并且中间下标不等于左边下标的话,那么就存在问题了,因为我们不知道最小的到底会出现在哪里。那么就只能left++,继续判断了,所以最坏情况还是O(n)只要在上题基础上,稍微修改一下就行了。class Sol...
分类:
其他好文 时间:
2014-12-18 13:32:36
阅读次数:
133
一个有序数组,没有重复数字,向右推进了几次,找出最小值。例如(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).直接遍历一次找到答案就没有意义了。之前做过类似的题目,不过我找不到具体的题号了。所以就随便搜了下Garnker的,知道是Search in Rota...
分类:
其他好文 时间:
2014-12-18 13:30:14
阅读次数:
140
A. Minimum Difficulty题意:有一个递增序列a,现在要去掉除了第一项和最后一项元素外的某一项,使新数列中相邻元素之差的最大值最小。分析:先求出原序列a中,相邻两项元素之差的最大值m。枚举去掉ai,则新序列相邻元素差的最大值为max{ m, ai+1 - ai },然后记录最小值即可...
分类:
其他好文 时间:
2014-12-18 06:48:36
阅读次数:
165
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-12-17 20:47:20
阅读次数:
167
题目链接:https://oj.leetcode.com/problems/min-stack/
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
push(x) -- Push element x onto stack.pop(...
分类:
其他好文 时间:
2014-12-17 16:28:46
阅读次数:
181
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:
其他好文 时间:
2014-12-16 19:07:17
阅读次数:
167
Given a string s, partition s such that every substring of the partition is a palindrome.
Return the minimum cuts needed for a palindrome partitioning of s.
For example, given s = "aab",
Return...
分类:
其他好文 时间:
2014-12-15 21:50:08
阅读次数:
172
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get...
分类:
其他好文 时间:
2014-12-15 17:25:36
阅读次数:
212
Given amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-12-14 17:07:20
阅读次数:
357