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

finished and tests are passing #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Bitaman
Copy link

@Bitaman Bitaman commented Sep 29, 2019

Hash Table Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Why is a good Hash Function Important? a good hash function can prevent overloading and the hash result would be a hash with ideally one value for each key which makes it easy to look up items.
How can you judge if a hash function is good or not? if it spread the items evenly and it is fast
Is there a perfect hash function? If so what is it? I don't think so
Describe a strategy to handle collisions in a hash table we can chain the items putting them in a linked list.
Describe a situation where a hash table wouldn't be as useful as a binary search tree if we need our data to be sorted cos hash tables are not sorted or have any structure for sorting.
What is one thing that is more clear to you on hash tables now how they works behind the scene

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Thanks for getting this in. Nice work, you hit the essential learning goals here well done.

# Time Complexity: ?
# Space Complexity: ?
# Time Complexity: O(n * m log m)we go through the array once and for each string we sort which is an m log m time complexcity
# Space Complexity: O(n) worse case we don't have any anagram and the size of the hash table is the same size of the array

def grouped_anagrams(strings)

Choose a reason for hiding this comment

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

👍

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