Tagged articles

O(1)

3 articles · Page 1 of 1
Nullbody Notes
Nullbody Notes
Nov 17, 2023 · Fundamentals

How to Implement an O(1) LRU Cache for Interview Success

This article explains how to implement an O(1) LRU cache in Go by combining a hash table with a doubly linked list, detailing the put and get operations, eviction policy, and providing complete, ready‑to‑run source code along with illustrative diagrams.

Cache EvictionDoubly Linked ListGo
0 likes · 4 min read
How to Implement an O(1) LRU Cache for Interview Success