I am working with large number of integer permutations. The number of elements in each permutation is K. The element size is 1 byte. I need to generate N unique random permu
Heres one way of doing it.
1) generate first N permutations and store them on the disk.
2) then run a randomize algorithm on the permutations.
You can optimize using Divide and Conquer , by picking only a first X elements from the disk and then randomizing it, and the next X elements in the next iteration, and so on... and then merge the results.
You probably don't need the disk here.