文件名称:Random-number-does-not-repeat
- 所属分类:
- C#编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2014-10-10
- 文件大小:
- 6kb
- 下载次数:
- 0次
- 提 供 者:
- crazy_******
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
不重复随机数
使用三种算法实现生成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