Random array generation with no duplicates

前端 未结 9 980
無奈伤痛
無奈伤痛 2020-11-28 12:48

I am trying to create something that generates a random array with no duplicate values. I\'ve already looked at other answers but none seem to help me understand. I cannot t

9条回答
  •  囚心锁ツ
    2020-11-28 13:12

    If you want to pseudo-randomly traverse a large space without maintaining visited indices, you should look at this project I contributed to years ago for the basic technique. http://packetfactory.openwall.net/projects/ipspace/index.html

    You should be able to adapt it to your purposes, source is at the bottom of the page.

提交回复
热议问题