Skip to content

Conversation

jessepope
Copy link

Hash Table Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Why is a good Hash Function Important? To ensure an efficient time complexity
How can you judge if a hash function is good or not? By evaluating the lookup time and ensuring it has few collisions
Is there a perfect hash function? If so what is it? No, there is always room for collisions and the design has a give and take
Describe a strategy to handle collisions in a hash table You can check each index for the next empty one with linear probing
Describe a situation where a hash table wouldn't be as useful as a binary search tree If you need to maintain a specific order of elements
What is one thing that is more clear to you on hash tables now I think it is more clear to me how it is possible to have a constant lookup time, but I still don't quite understand how it is maintained.

@chimerror
Copy link

Grabbing this to grade!

Copy link

@chimerror chimerror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

I had no comments, but overall this looks good enough for a Green!

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.

2 participants