Guarantee O(1) worst-case lookup: every key has exactly two possible slots (via two hashes), so a lookup checks just those two — never more. On insert, if both are full, evict an occupant to its other nest (like a cuckoo chick), and repeat; rare cycles trigger a rehash. Here key 42 has nests 9 and 6; a reader checks exactly two places and stops.
The demo shows key 42’s two nests and that lookup is a fixed 2 checks: live demo
“Cuckoo inserts are O(1).” — lookups are worst-case O(1); inserts are expected O(1) but can cascade and occasionally force a rehash. cited
Worst-case two reads, forever. data structure
On i-13, key 42 hashes to nests 9 and 6; a lookup is a constant 2 checks: