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

scissors laurel O #55

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

scissors laurel O #55

wants to merge 3 commits into from

Conversation

lolkinetzky
Copy link

@lolkinetzky lolkinetzky commented Feb 4, 2022

Hash Table Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Why is a good Hash Function Important? A good hash function will organize data well and avoid collisions, it is important to avoid pitfalls where your hash function can't be abused to unhash values as easily to avoid security pitfalls such as in the case with Ruby.
How can you judge if a hash function is good or not? A hash function must use all data, with the hash value being dependent on the data being hashed.The hash function has to "uniformly" distribute data across the entire set of possible values, while making sure to generate commensurately different hash values for data that is similar.
Is there a perfect hash function? If so what is it? It would look something like the above.
Describe a strategy to handle collisions in a hash table avoiding collisions is a good reason why one should seek to uniformly distribute data and generate commensurately different values for similar data
Describe a situation where a hash table wouldn't be as useful as a binary search tree BST might be more memory efficient if we don't know the relative amount of values we will want to store
What is one thing that is more clear to you on hash tables now since hash tables are designed well, I should see if there is a strategy where I can leverage a hash table, while being grateful someone else has done the work of writing the hashing function into the data structure for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant