[104787] in Cypherpunks

home help back first fref pref prev next nref lref last post

No subject found in mail header

daemon@ATHENA.MIT.EDU (Anonymous)
Wed Oct 28 19:46:33 1998

Date: Thu, 29 Oct 1998 00:32:00 +0100
From: Anonymous <nobody@replay.com>
To: coderpunks@toad.com
Reply-To: Anonymous <nobody@replay.com>

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


home help back first fref pref prev next nref lref last post