Cuckoo&#x27;s insert is, in fact, hard to implement correctly. Every implementation I looked at was vulnerable to &quot;chosen key&quot; attack which made it either O(n) or worse -- run into an infinite loop or fail to insert.