"kid sister" resources underestimated?

New Message Reply About this list Date view Thread view Subject view Author view

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


New Message Reply About this list Date view Thread view Subject view Author view

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

The following archive was created by hippie-mail 7.98617-22 on Sat Apr 10 1999 - 01:15:22