Hashing Flashcards

1
Q

Cuckoo hashing (idea)

A

There are two arrays and different hash function for each. Each Time you insert a new element you try inserting into the first array with its hash function. If it is already taken “kick out” the existing element and take its place, try putting it into the second array using its hash function. Do this back and forth until all is settled.

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

Cuckoo hashing (time complexity)

A

All dictionary operations are O(1) complexity.

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