Pseudo-random numbers in [0, n), covering all numbers in n steps?
tn via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 25 10:55:38 PST 2016
On Thursday, 25 February 2016 at 18:19:56 UTC, John Colvin wrote:
> I don't know of an algorithm for generating random permutations
> that isn't in-place (or O(N) storage), but I'm not an expert on
> the topic so maybe one does exist.
These might be relevant:
http://stackoverflow.com/questions/10054732/create-a-random-permutation-of-1-n-in-constant-space
http://stackoverflow.com/questions/32182120/to-generate-random-permutation-of-a-array-in-on-time-and-o1-space
More information about the Digitalmars-d
mailing list