Anonymous (nobody@replay.com)
Thu, 29 Oct 1998 00:32:00 +0100
In the following snippet of pseudo-code, what should the value of
SWAP_TIMES be to make the array A[] random, assuming
that getrand() returned a truly random integer between
0 and 255
A[256];
for(i=0;i<SWAP_TIMES;i++){
x=getrand();
y=getrand();
swap(A[x],A[y]);
}
Thanks
The following archive was created by hippie-mail 7.98617-22 on Sat Apr 10 1999 - 01:15:22