Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.5.2 - Error in text #70

Open
mckeownp opened this issue Aug 11, 2019 · 1 comment
Open

5.5.2 - Error in text #70

mckeownp opened this issue Aug 11, 2019 · 1 comment

Comments

@mckeownp
Copy link

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 mckeownp changed the title 5.5 5.5.2 - Error in text Aug 11, 2019
@grrdsoto
Copy link

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

@bnmnetp bnmnetp transferred this issue from RunestoneInteractive/RunestoneComponents Aug 28, 2019
WhitfordR added a commit to WhitfordR/pythonds that referenced this issue Sep 18, 2019
…formula yet. Will address later. Addressing issue RunestoneInteractive#70, I am a Berea college student.
bnmnetp added a commit that referenced this issue Dec 23, 2019
Addes the missing general formula. Issue #70 resolved
jdeisenberg pushed a commit to jdeisenberg/pythonds that referenced this issue Jul 25, 2023
jdeisenberg pushed a commit to jdeisenberg/pythonds that referenced this issue Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants