|
|
|
|
|
by dmitrygr
405 days ago
|
|
You’re assuming no other data structure points to the element. It may. Example: implement a cache. Each element is: key, value, linked list node for hash table bucket, linked list node for LRU. Hash table to look up element. Element is both a member of hash table and of linked list. Linked list is used as LRU for feeling memory when needed. LRU never traversed but often needs removal and reinsertion. |
|