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

Time - Yesenia #33

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

Time - Yesenia #33

wants to merge 1 commit into from

Conversation

yesentorres
Copy link

Hash Table Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Why is a good Hash Function Important? A good hash function is important so that it doesn't cause too many collisions, which would reduce the efficiency of a Hash Table.
How can you judge if a hash function is good or not? Depending on how many collisions it causes.
Is there a perfect hash function? If so what is it? There is not, hash functions cannot guarantee no collisions.
Describe a strategy to handle collisions in a hash table Employ a hashing function that utilizes the division method to assign the keys.
Describe a situation where a hash table wouldn't be as useful as a binary search tree A BST would be preferred when a dataset cannot provide unique key values.
What is one thing that is more clear to you on hash tables now I am have more clarity on how hash tables compare to other ADTs.

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 Yesenia, these both work and hit the learning goals here. Nice work!

# Time Complexity: ?
# Space Complexity: ?
# 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.

👍

Comment on lines +25 to 27
# Time Complexity: O(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

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