logoalt Hacker News

marcosdumayyesterday at 5:14 PM1 replyview on HN

Nowadays I expected an opaque dictionary to be amortized O(1).

Granted, one can technically call that O(log(n)), but that's not a helpful categorization.


Replies

emil-lpyesterday at 6:14 PM

You cannot guarantee that from a hash map since an adversary who knows the hash function (unless it's cryptographic) could game the data structure to their advantage.