Re: searching for missing element in an array
- From: Willem <willem@xxxxxxxx>
- Date: Fri, 30 May 2008 05:21:46 +0000 (UTC)
Richard wrote:
) "The trick" is therefore guaranteed to work provided only that n(n-1)/2
) does not exceed the maximum possible value for a number on the host
) system.
Or if your host system can do modulo-X (*) math properly.
Note that you will have to be quite precise in how you calculate n(n-1)/2.
*) X being, for example, 2^32
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
.
- Follow-Ups:
- Re: searching for missing element in an array
- From: Richard Harter
- Re: searching for missing element in an array
- References:
- searching for missing element in an array
- From: srk
- Re: searching for missing element in an array
- From: rossum
- Re: searching for missing element in an array
- From: user923005
- Re: searching for missing element in an array
- From: CBFalconer
- Re: searching for missing element in an array
- From: user923005
- Re: searching for missing element in an array
- From: Richard Heathfield
- searching for missing element in an array
- Prev by Date: Re: searching for missing element in an array
- Next by Date: Re: searching for missing element in an array
- Previous by thread: Re: searching for missing element in an array
- Next by thread: Re: searching for missing element in an array
- Index(es):
Relevant Pages
|