Skip to content

Conversation

@antoniairizarry
Copy link

Hash Table Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Why is a good Hash Function Important? They're great when working with key value pairs and modeling their relationship. They can also be a speedy way to work with data.
How can you judge if a hash function is good or not? Good hash functions map values evenly and avoid collisions
Is there a perfect hash function? If so what is it? No, like other data structures, they have some use cases they're great in and some that are not.
Describe a strategy to handle collisions in a hash table Using a linked list in the slot where there is more than one item mapped.
Describe a situation where a hash table wouldn't be as useful as a binary search tree When sorting is the main goal.
What is one thing that is more clear to you on hash tables now The process of handling collisions.

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.

Well done Antonia, you hit the learning goals here. Nice work!

Comment on lines +4 to 7
# Time Complexity: O(n)
# Space Complexity: O(n)

def grouped_anagrams(strings)

Choose a reason for hiding this comment

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

👍 , Nicely done

Comment on lines +26 to 28
# Time Complexity: O(n log n)
# Space Complexity: O(n)
def top_k_frequent_elements(list, k)

Choose a reason for hiding this comment

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

👍 , Nice work

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