文件名称:main-element
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:226.51kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
具体地讲,如果一个数组A[1..n]中超过半数的元素都相同时,该数组被称为含有一个主元素。
(a) 设计一个有效算法(至少是O(n logn)),确定该数组中是否含有一个主元素,如果有,找出这个元素。 (为简单起见,假设n是2的幂,且n<150)
(b) 能否给出一个线性时间算法?
需注意的是,该数组的元素之间可能不存在顺序——即不能进行”A[i]<A[j]”的判断,但是可以进行是否相等的判断。
-Specifically, if an array A [1 .. n] more than half of the elements are the same, the array is known as a main element contains. (A) to design an effective algorithm (at least O (n logn)), to determine whether the array contains a primary element, and if so, find out the elements. (For simplicity, assume that n is a power of 2, and n < 150) (b) can give a linear time algorithm? It must be noted that the array may not exist between the elements of the order- that can not be " A [i] <A[j]”的判断,但是可以进行是否相等的判断。
(a) 设计一个有效算法(至少是O(n logn)),确定该数组中是否含有一个主元素,如果有,找出这个元素。 (为简单起见,假设n是2的幂,且n<150)
(b) 能否给出一个线性时间算法?
需注意的是,该数组的元素之间可能不存在顺序——即不能进行”A[i]<A[j]”的判断,但是可以进行是否相等的判断。
-Specifically, if an array A [1 .. n] more than half of the elements are the same, the array is known as a main element contains. (A) to design an effective algorithm (at least O (n logn)), to determine whether the array contains a primary element, and if so, find out the elements. (For simplicity, assume that n is a power of 2, and n < 150) (b) can give a linear time algorithm? It must be noted that the array may not exist between the elements of the order- that can not be " A [i] <A[j]”的判断,但是可以进行是否相等的判断。
(系统自动生成,下载前可以参看下载内容)
下载文件列表
主元素/Debug/主元素.exe
主元素/Debug/主元素.ilk
主元素/Debug/主元素.pdb
主元素/主元素/Debug/BuildLog.htm
主元素/主元素/Debug/mt.dep
主元素/主元素/Debug/vc90.idb
主元素/主元素/Debug/vc90.pdb
主元素/主元素/Debug/主元素.exe.embed.manifest
主元素/主元素/Debug/主元素.exe.embed.manifest.res
主元素/主元素/Debug/主元素.exe.intermediate.manifest
主元素/主元素/Debug/主元素.obj
主元素/主元素/main1.txt
主元素/主元素/main2.txt
主元素/主元素/result.txt
主元素/主元素/主元素.cpp
主元素/主元素/主元素.vcproj
主元素/主元素/主元素.vcproj.LovelyJin-PC.Lovely Jin.user
主元素/主元素.ncb
主元素/主元素.sln
主元素/主元素.suo
主元素/主元素的实验报告.doc
主元素/主元素/Debug
主元素/Debug
主元素/主元素
主元素
主元素/Debug/主元素.ilk
主元素/Debug/主元素.pdb
主元素/主元素/Debug/BuildLog.htm
主元素/主元素/Debug/mt.dep
主元素/主元素/Debug/vc90.idb
主元素/主元素/Debug/vc90.pdb
主元素/主元素/Debug/主元素.exe.embed.manifest
主元素/主元素/Debug/主元素.exe.embed.manifest.res
主元素/主元素/Debug/主元素.exe.intermediate.manifest
主元素/主元素/Debug/主元素.obj
主元素/主元素/main1.txt
主元素/主元素/main2.txt
主元素/主元素/result.txt
主元素/主元素/主元素.cpp
主元素/主元素/主元素.vcproj
主元素/主元素/主元素.vcproj.LovelyJin-PC.Lovely Jin.user
主元素/主元素.ncb
主元素/主元素.sln
主元素/主元素.suo
主元素/主元素的实验报告.doc
主元素/主元素/Debug
主元素/Debug
主元素/主元素
主元素
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.