pythonds icon indicating copy to clipboard operation
pythonds copied to clipboard

5.5.2 - Error in text

Open mckeownp opened this issue 5 years ago • 1 comments

Hi,

In the following text (from section 5.5.2, Collision Resolution, just before figure 11) I think the 1, 3, 5, 7... sequence should be 1, 4, 9, 16, 25, 36. It would also be good to clarify with an equation, for example: The ith skip will be i^2, meaning the ith probe be (h+i^2)%sizeoftable

A variation of the linear probing idea is called quadratic probing. Instead of using a constant “skip” value, we use a rehash function that increments the hash value by 1, 3, 5, 7, 9, and so on. This means that if the first hash value is h, the successive values are h+1, h+4, h+9, h+16, and so on.

Cheers, Paul McKeown. University of Canterbury, NZ.

mckeownp avatar Aug 11 '19 03:08 mckeownp

This issue should be in a book, correct? If so, which one?

grrdsoto avatar Aug 28 '19 18:08 grrdsoto