by layer8 · 2y ago · 0 comments
You enhance the stored elements to also be the nodes of a doubly linked list. The overhead is rarely critical in practice. It can be made more efficient if the hash map doesn’t need to support deletion.
Depends; you add two extra pointers for each element, so your int → int hash table balloons in size.