Skip to content

Conversation

@ktvoort123
Copy link

Hash Table Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Why is a good Hash Function Important? Hashes can have very efficient Big Os
How can you judge if a hash function is good or not? A good hash is easy to compute, maps any give input to valid buckets, and minimizes collisions.
Is there a perfect hash function? If so what is it? No, there isn't a mathemetically provable perfect solution.
Describe a strategy to handle collisions in a hash table One strategy to handle collisions in a hash table is to have a second hash function, which is called "rehashing". If a collision occurs, then you can use the secondary hash function to find another bucket to use.
Describe a situation where a hash table wouldn't be as useful as a binary search tree A BST would be more useful than a hash if a dataset cannot provide unique key values.
What is one thing that is more clear to you on hash tables now I understand the problem with collision and the solutions much better now.

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