Cuckoo Hash Table

Inspired by the behavior of cuckoo birds, where they displace the eggs of other birds from their nests to be replaced with their own, cuckoo hashing uses a similar approach to collision handling by having a newly inserted value evict an existing key to be relocated to a second hash bucket.

As proven by the famous balls-and-bin problems, cuckoo hashing achieves efficient performance, with insertion taking O(1) amortized time and O(log log n) time with high probability when the load factor is below 0.5. This makes cuckoo hashing a powerful choice for applications that require fast lookups and insertions, such as in-memory databases and caching systems.

Languages

C++

Tools & Libraries

GTest CMAKE Git
Cuckoo Hash Table Screenshot

Project Details:

View Code on GitHub Back to Projects