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

How do I know if the value corresponds to the original key #6

Open
eric49861 opened this issue May 4, 2024 · 1 comment
Open

How do I know if the value corresponds to the original key #6

eric49861 opened this issue May 4, 2024 · 1 comment

Comments

@eric49861
Copy link

eric49861 commented May 4, 2024

I have a problem with one point, which I think is design flaws.
When I want to query some value from the hashtable, I can do this by running hashtable.Get(key, func(Slot)(bool,error))... But due to hash collisions, there may be many values associated with the hashcode of the current key, but the original key is not stored in the slot, so with a MatchFunc function, how can the user know if it is a match?
The above point is my doubt, and I have also done relevant tests.

@roseduan
Copy link
Collaborator

Can you show me some example code?

The hash table is a Linear Hashing algorithm, see https://en.wikipedia.org/wiki/Linear_hashing

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