- 有的时候我们使用数组sort方法配合Math.random()将数据顺序打乱,但这样得到的结果并不是等可能的;假设某种情况出现时,需要sort返回正数n次,那么这种情况对应出现的概率就是1/2^n。
- 在线地址:http://www.qianhaogege.com/artwork/2
-
Notifications
You must be signed in to change notification settings - Fork 0
BL-Lac149597870/random-data
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
利用数组sort方法产生随机数组的研究
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published