在网页的中增加以上这句话,可以让网页的宽度自动适应手机屏幕的宽度。其中:width=device-width :表示宽度是设备屏幕的宽度initial-scale=1.0:表示初始的缩放比例minimum-scale=0.5:表示最小的缩放比例maximum-scale=2.0:表示最大的缩放比例u...
分类:
移动开发 时间:
2015-03-06 14:02:58
阅读次数:
150
题目:leetcode
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.
Try to solve it in linear time/space.
Return 0 if the array contains less than 2...
分类:
编程语言 时间:
2015-03-06 11:23:28
阅读次数:
248
1.题目描述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 leaf node.2.解决方案1class Solution {
public:...
分类:
其他好文 时间:
2015-03-06 11:22:23
阅读次数:
126
Maximum Subarray问题:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the arra...
分类:
其他好文 时间:
2015-03-05 16:10:15
阅读次数:
129
Maximum sum
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 34697
Accepted: 10752
Description
Given a set of n integers: A={a1, a2,..., an}, we define a ...
分类:
其他好文 时间:
2015-03-05 14:48:35
阅读次数:
148
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.思路:自己脑子当机了,总是想着斜率和截距都要相同。但实际上三个点是一条直线的话只要它们的斜率相同就可以了,...
分类:
其他好文 时间:
2015-03-05 14:27:52
阅读次数:
132
LeetCode 上不会的Reverse IntegerSingle Number II斐波那契数列 非递归算法Maximum Subarray 维持最大值Integer to RomanSort ColorsPopulating Next Right Pointers in Each Node 怎...
分类:
其他好文 时间:
2015-03-05 12:15:22
阅读次数:
161
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 using namespace std;int Ma...
分类:
其他好文 时间:
2015-03-05 00:10:17
阅读次数:
202
题目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 leaf node.代码/**
* Definition for binary tree
* p...
分类:
其他好文 时间:
2015-03-04 17:08:21
阅读次数:
118
Say you have an array for which the ith element is the price of a given
stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
解题思路:要求两次交易的最大利润....
分类:
其他好文 时间:
2015-03-04 17:04:16
阅读次数:
157