Design Flashcards

1
Q

What are different methods of handling collision in hash map?

A

http://kamalmeet.com/algorithms/hashmap-collision-handling-using-chaining-and-open-addressing/
Separate chaining and open addressing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is chaining in hashtable?

A

https://www.educative.io/edpresso/what-is-chaining-in-hash-tables
Chaining is a technique used for avoiding collisions in hash tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is bloom filter?

A

Its the replacement of hash Set. Hash Set has O(1) time but O(n) space complexity.
Bloom filter can achieve O(1) lookup in O(1) space complexity. However bloom filter can give false positive but can’t give false negatives
For example bloom filter tell us that value already exist but its actually not exist . However if bloom filter tells that value does not exist than it is guaranteed that value does not exist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly