在<head>中引入 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> ,不加这句,移动端都返回980。加上这句,PC和移动端都能正确获取。 设备宽度 var diviceWid ...
分类:
移动开发 时间:
2016-04-19 19:11:59
阅读次数:
206
问题描述: For example, Given nums = [1,3,-1,-3,5,3,6,7], and k = 3. Therefore, return the max sliding window as [3,3,5,5,6,7].、 问题分析: 又是一道区间最值的题,又要求近线性时间的 ...
题目链接:http://poj.org/problem?id=3061 题意:给一个长为n的数列和整数s,求一个连续的子序列,使得这个子序列长度最短并且不小于这个整数s。 统计[1~i]的子序列和sum(i),(sum(0)=0)。然后求一个区间[i,j]的和即为sum(j)-sum(i-1) (i ...
分类:
其他好文 时间:
2016-04-18 17:02:55
阅读次数:
201
这篇文章讲无权二分图(unweighted bipartite graph)的最大匹配(maximum matching)和完美匹配(perfect matching),以及用于求解匹配的匈牙利算法(Hungarian Algorithm);不讲带权二分图的最佳匹配。
二分图:简单来说,如果图中点可以被分为两组,并且使得所有边都跨越组的边界,则这就是一个二分图。准确地说:把一个图的顶点划分为...
分类:
编程语言 时间:
2016-04-18 13:50:52
阅读次数:
179
Given two strings, find the longest common subsequence (LCS). Your code should return the length of LCS. Example For "ABCD" and "EDCA", the LCS is "A" ...
分类:
其他好文 时间:
2016-04-18 08:43:52
阅读次数:
117
POJ1458 Common Subsequence(最长公共子序列LCS) http://poj.org/problem?id=1458 题意: 给你两个字符串, 要你求出两个字符串的最长公共子序列长度. 分析: 本题不用输出子序列,非常easy,直接处理就可以. 首先令dp[i][j]==x表示 ...
分类:
其他好文 时间:
2016-04-17 22:13:36
阅读次数:
175
<!DOCTYPE HTML><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><title>demo..</t ...
分类:
其他好文 时间:
2016-04-17 15:55:22
阅读次数:
164
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 ...
分类:
其他好文 时间:
2016-04-17 07:59:43
阅读次数:
107
题目链接: Ordered Subsequence Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description A numeric sequence of a ...
分类:
编程语言 时间:
2016-04-17 00:24:19
阅读次数:
305
MSS与MTU的关系 TU:maximum transmission unit,最大传输单元,由硬件规定,如以太网的MTU为1500字节。 MSS:maximum segment size,最大分节大小,为TCP数据包每次传输的最大数据分段大小,一般由发送端向对端TCP通知对端在每个分节中能发送的最 ...
分类:
其他好文 时间:
2016-04-16 21:03:00
阅读次数:
366