Quantcast
Channel: random permutation - Stack Overflow
Viewing all articles
Browse latest Browse all 10

random permutation

$
0
0

I would like to genrate a random permutation as fast as possible.The problem: The knuth shuffle which is O(n) involves generating n random numbers.Since generating random numbers is quite expensive.I would like to find an O(n) function involving a fixed O(1) amount of random numbers.

I realize that this question has been asked before, but I did not see any relevant answers.

Just to stress a point: I am not looking for anything less than O(n), just an algorithm involving less generation of random numbers.

Thanks


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images