文件名称:Random-number-does-not-repeat
-
所属分类:
- 标签属性:
- 上传时间:2014-10-10
-
文件大小:6.29kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
不重复随机数
使用三种算法实现生成N个随机数的不重复排列。比较在N不同的情况下这三种算法的运行时间并进行复杂度分析。
利用时间函数生成N个随机数,然后根据上面的三种算法,既是通过生成不同于前i个已生成数比较,相同则去除,不同填入;或保留一个可记录元素是否出现的数组,来比较;或利用swap函数进行交换实现。来实现不重复随机数。-Random number does not repeat
There are three algorithms to generate random numbers N does not repeat order. N compared under different conditions of the three algorithms running time and complexity analysis.
Function of time to generate a random number N, then according to the above three algorithms, both by generating different the previous generation number of the i-th comparison, the same are removed, different fill or keep a record of whether the array element to Compare or use swap function swap implementation. To achieve not repeat random number.
使用三种算法实现生成N个随机数的不重复排列。比较在N不同的情况下这三种算法的运行时间并进行复杂度分析。
利用时间函数生成N个随机数,然后根据上面的三种算法,既是通过生成不同于前i个已生成数比较,相同则去除,不同填入;或保留一个可记录元素是否出现的数组,来比较;或利用swap函数进行交换实现。来实现不重复随机数。-Random number does not repeat
There are three algorithms to generate random numbers N does not repeat order. N compared under different conditions of the three algorithms running time and complexity analysis.
Function of time to generate a random number N, then according to the above three algorithms, both by generating different the previous generation number of the i-th comparison, the same are removed, different fill or keep a record of whether the array element to Compare or use swap function swap implementation. To achieve not repeat random number.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Cpp0.plg
Cpp0.cpp
Cpp0.dsp
Cpp0.dsw
Cpp0.ncb
Cpp0.opt
Cpp0.cpp
Cpp0.dsp
Cpp0.dsw
Cpp0.ncb
Cpp0.opt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.