steven.soroka@mts.mb.ca
Thu, 29 Oct 1998 10:47:04 -0600
Why bother? oh well...
make 1024 < SWAP_TIMES < 8192 or something.. it's not like it'll take up a
whole lot of processor time..
> 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:23