Skip to content

Fix incomplete sentence #54

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions 06-resizing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ first prime larger than the base size. To resize up, we double the base size,
and find the first larger prime, and to resize down, we halve the size and
find the next larger prime.

Our base sizes start at 50. Instead of storing
Our base sizes start at 50.

We use a brute-force method to find the next prime, by checking if each
successive number is prime. While brute-forcing anything sounds alarming, the
number of values we actually have to check is low, and the time it takes is
outweighed by the time spent re-hashing every item in the table.
Instead of storing a list of primes, we use a brute-force approach to find the
next one by checking each successive number for primality. While brute-forcing
anything sounds alarming, the number of values we actually have to check is low,
and the time it takes is outweighed by the time spent re-hashing every item in
the table.

First, let's define a function for finding the next prime. We'll do this in two
new files, `prime.h` and `prime.c`.
Expand Down