-
Notifications
You must be signed in to change notification settings - Fork 280
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
Hash table should be implemented as Dictionary #22
Comments
Hi Petr; Thanks for posting your question about hash tables. As you've noted, the If there's something else you'd like to see, feel free to submit a pull request and I can review. Thanks;
|
Yes, I just mention it here, to clarify some specific aspects of hash table. Probably I will PR new algorithm later. Anyway, thanks for great project! |
Hi Petr; Sounds good. You've raised some good points that would probably help others. I'll see about extending the corresponding the hash tables essay with these notes. |
These comments will included in the book when it goes to print. |
The main advantage of hash table is quick access to elemets:
Time complexity for hash tables (from wiki):
Since your hash table implemented as loop in array - the average complexity of search is O(n), not O(1), that not fit this time complexity requirements of hash tables.
For correct implementation of this structure hash table should be implemented as Dictionary
The text was updated successfully, but these errors were encountered: