by ot · 15y ago · 0 comments
Almost all the containers we use on a regular basis provide only amortized constant time inserts.
Even algorithms like binary trees can end up with very bad worst cases unless great care is taken in allocating their nodes.
In standard containers if you pre-define the capacity (say with std::vector::reserve) all the insertions are guaranteed to be constant time. Cuckoo hashing can't give this guarantee.