Skip to content

HashCollisionLinearProbing cannot remove elements with same hash #26

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

Closed
JeremyFan opened this issue Sep 6, 2017 · 2 comments
Closed

Comments

@JeremyFan
Copy link

1.Very similar to #23

hash.remove('Jonathan')
hash.remove('Jamie')

As the position Jonathan being undefined, Jamie cannot be removed.

2.There is an endless loop in testcase 08-UsingHashCollisionLinearProbing.js

hashLinearProbing.remove('Gandalf');
hashLinearProbing.get('Gandalf')

The position of Gandalf was undefined, but the loop will continue till find Gandalf.

@loiane loiane added the bug label Sep 6, 2017
@loiane
Copy link
Owner

loiane commented Sep 6, 2017

Thanks! I'll take a look and get back to you.
I need to rewrite this algorithm with a cache approach.

@loiane loiane added the Fixed label Oct 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants