As a researcher in theoretical computer science, I love PDFs more than any other format when it comes to mathematics.
There simply is no contender to LaTeX and PDFs.
Lucky for you, almost all research in math, cs, and physics, are put on arxiv, where you can download the source code (.tex) as well as get an HTML render.
It can be subjective, because it's internal to you and not something that gets litigated or whatever. A close call is anything that you personally consider to be a close call.
I'm not asking you to post it here, I'm asking you to think about it and then remember it in the future, should the event ever occur.
People … say that all the time. *I* say that all the time. It’s true enough to be accurate in 99.9% of the cases; and we put barriers in place when implementing code (like configuring the hashing algorithm) to keep it that way.
O(1) insertion is the amortized worst-case time complexity, actually. (Amortized in the sense that the O(n) cost of copying is paid only during the n-th insertion). Average complexity is a slightly different thing.
It is not “worst-case” (as the post demonstrates, you can get worse results by using specifically crafted data that exploits hash collisions). There are algorithms that can get you O(logN) instead of O(N) even on such data.
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.
reply