The Wayback Machine - https://web.archive.org/web/20201103184341/https://github.com/TheAlgorithms/Java/pull/1422
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

Add dynamic hash table functionality #1422

Merged
merged 1 commit into from Aug 26, 2020
Merged

Conversation

@rbshealy
Copy link
Contributor

@rbshealy rbshealy commented Aug 17, 2020

The checkLoadFactor() method adds dynamic array functionality to HashTableLinearProbing.java
Through its use, it can be a powerful tool in avoiding collisions as the hash table fills.
It calls the lengthenTable() method when load factor exceeds .7

I have updated MainLinearProbing.java to test this new method.

I've also made a change to the findHash() method to avoid NullPointerException at runtime and made code easier to read in some places

@rbshealy
Copy link
Contributor Author

@rbshealy rbshealy commented Aug 23, 2020

@StepfenShawn Could you look at this when you get a chance?

@StepfenShawn StepfenShawn merged commit b7a0562 into TheAlgorithms:master Aug 26, 2020
@StepfenShawn
Copy link
Member

@StepfenShawn StepfenShawn commented Aug 26, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.