-
sliding
说明: 求出sliding window的最大最小值(n array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves rightwards by one position. Following is an example:
The array is [1 3-1-3 5 3 6 7], and k is 3.
Window position Minimum value Maximum value
[1 3 -1]-3 5 3 6 7 -1 3
1 [3 -1 -3] 5 3 6 7 -3 3
1 3 [-1 -3 5] 3 6 7 -3 5
1 3 -1 [-3 5 3] 6 7 -3 5
1 3 -1 -3 [5 3 6] 7 3 6
1 3 -1 -3 5 [3 6 7] 3 7
Your task is to determine the maximum and minimum values in the sliding window at each position. )
- 2011-04-03 19:25:46下载
- 积分:1
-
AutoUpData
本例为魔兽世界客户端自动更新程序,采用URLDownloadToFile异步机制实现.(World of Warcraft in this case the client automatically update procedure for the asynchronous mechanism URLDownloadToFile achieved.)
- 2010-02-25 17:00:59下载
- 积分:1
-
426754CTreeDemo
说明: 数据库的递归查找程序,可以快速的实现数据库的查找(Recursive Finder database, you can quickly find the realization of the database)
- 2008-10-22 12:34:57下载
- 积分:1
-
vc-skin
vc 皮肤库 skin++包含了大量的皮肤文件,欢迎下载(vc skin, skin++ library contains a large number of skin files, please download
)
- 2020-09-13 14:18:00下载
- 积分:1
-
JosephRing
约瑟夫环问题算法的优化
1、问题描述:
已知n个人(以编号1,2,3...n分别表示)围坐在一张圆桌周围。从编号为k的人开始报数,数到m的那个人出列;他的下一个人又从1开始报数,数到m的那个人又出列;依此规律重复下去,直到圆桌周围的人全部出列,求最后出列的哪一个人。(err)
- 2007-12-09 16:13:33下载
- 积分:1
-
Mechanical-design
机械设计Matlab实现,如连杆机构的结构设计,槽轮机构的机构设计(Mechanical design and Matlab implementation, such as the linkage structure of grooved wheel mechanism design, mechanism design)
- 2012-05-07 14:40:20下载
- 积分:1
-
matlab_VC
matlab与vc的混合编程说明,主要是如何配置环境,有详细的截图说明(the help for together using of matlab and VC6.0,including collocate environment and giving detailed
illustrate
)
- 2012-01-03 21:48:36下载
- 积分:1
-
axissort
Beginning Direct3D Game Programming源代码Part3chapter12(Beginning Direct3D Game Programming Source Code Part3 chapter12)
- 2009-03-03 12:10:02下载
- 积分:1
-
zhebanchazhao
这半查找法 是一种快速查找算法 查找效率比较高 容易实现 理想的查找算法(This search method is a fast and find more efficient algorithms to find easy to implement the ideal search algorithm)
- 2012-05-04 00:03:29下载
- 积分:1
-
Compiler-C
compiler on c++
good luck
- 2014-01-23 00:45:17下载
- 积分:1