文件名称:Majo1
-
所属分类:
- 标签属性:
- 上传时间:2013-09-07
-
文件大小:612byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
给定含有n 个元素的多重集合S = { a1,a2 ,……,an} ,1≤ai≤n,1≤i≤n。
每个元素在S中出现的次数称为该元素的重数
多重集S中重数大于n/2 的元素称为主元素
设计一个O(n)时间算法,计算S 的主元素
-Given the multiple of n elements containing the set S = {a1, a2, ......, an}, 1 ≤ ai ≤ n, 1 ≤ i ≤ n. Each element in S is called the number of occurrences of the element multiplicity of heavy multi-set S is greater than n/2 elements is called the primary element design an O (n) time algorithm to calculate the main elements of S
每个元素在S中出现的次数称为该元素的重数
多重集S中重数大于n/2 的元素称为主元素
设计一个O(n)时间算法,计算S 的主元素
-Given the multiple of n elements containing the set S = {a1, a2, ......, an}, 1 ≤ ai ≤ n, 1 ≤ i ≤ n. Each element in S is called the number of occurrences of the element multiplicity of heavy multi-set S is greater than n/2 elements is called the primary element design an O (n) time algorithm to calculate the main elements of S
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Majo1.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.