Skip to content

Conversation

@yieknee
Copy link

@yieknee yieknee commented Sep 14, 2020

Hash Table Practice

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Why is a good Hash Function Important? It will cut down on the time because there won't be collisions
How can you judge if a hash function is good or not?
Is there a perfect hash function? If so what is it? Yes, direct addressing
Describe a strategy to handle collisions in a hash table linear probing
Describe a situation where a hash table wouldn't be as useful as a binary search tree If you need to find something in order
What is one thing that is more clear to you on hash tables now

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.

Nice work Yieni, you hit the main learning goals here. Well done.

Comment on lines +4 to 7
# Time Complexity: O(n * klog(k))
# 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 +21 to 23
# 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.

👍 It's O(n) due to the time complexity of the max method.

# row, column or 3x3 subgrid
# Time Complexity: ?
# Space Complexity: ?
def valid_sudoku(table)

Choose a reason for hiding this comment

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

Looks like you're 1/2 way there!

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