3 ms·
If you need middle or random access then it’s an array, neither a queue nor a stack :) I couldn’t understand the animation at all. LRU is much simpler to under
by deepGem 3y ago
If you need middle or random access then it’s an array, neither a queue nor a stack :)
I couldn’t understand the animation at all.
LRU is much simpler to understand and implement what’s so complicated about a doubly linked list ?
- xxs 3y agoThe median could trivially be the root of a red/black tree.