Probabilistic search - psearch.tar.gz

Hasan Aljudy hasan.aljudy at gmail.com
Tue Apr 4 23:37:40 PDT 2006


sundaresh wrote:
> This (attached) search function of an unordered array of elements appears
> to have a logarithmic search time, like binary search of an ordered array.
> 
> 

It doesn't compile, on VC++ 2005 I get:

psearch.c(19) : error C2036: 'void *' : unknown size
psearch.c(27) : error C2036: 'void *' : unknown size

I fixed it by casting base to int
(int)base

anyway, I'd like (please) to see a human readable pseudo code that 
doesn't include mangling with pointers, just array indecies.



More information about the Digitalmars-d mailing list