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

Schanen - Earth #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Schanen - Earth #7

wants to merge 3 commits into from

Conversation

schanenR
Copy link

Hash Table Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Why is a good Hash Function Important? Because the hashing function allows the hash to point to different keys. Having a good hashing function can avoid frequent collisions.
How can you judge if a hash function is good or not? It mostly map to different keys, be consistent, constant time & should appear random.
Is there a perfect hash function? If so what is it? There is not one because the functions will work differently with different variables and amounts of data.
Describe a strategy to handle collisions in a hash table Chaining, where a linked list is build at the key linking all values at that key.
Describe a situation where a hash table wouldn't be as useful as a binary search tree It would be useful to use a binary tree when there are not useful unique keys to build a hash.
What is one thing that is more clear to you on hash tables now The structure and how to build one since they are not a datatype in javascript.

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

Successfully merging this pull request may close these issues.

1 participant