Tagged articles
doubly linked list
10 articles · Page 1 of 1
This article explains how LRU cache combines a hash map for O(1) key lookup with a doubly linked list to maintain access order, enabling O(1) get and put operations including eviction of least recently used items, illustrated with step-by-step examples and a complete Python implementation.
AlgorithmCache EvictionLRU cache
0 likes · 11 min read

This article explains why caching is crucial, walks through the classic interview question of implementing an O(1) LRU cache, and provides a complete Python solution using a hash table combined with a doubly linked list, including complexity analysis, common pitfalls, and alternative approaches.
LRU cachealgorithm interviewdoubly linked list
0 likes · 11 min read

This article explains the LRU cache eviction strategy, details its O(1) get and put operations using a combined hash table and doubly linked list, and provides a complete Java implementation with step‑by‑step code examples and design rationale.
JavaLRU cacheO(1)
0 likes · 10 min read

Learn how to design and implement an O(1) LRU (Least Recently Used) cache in Java using a combined hash map and doubly linked list, covering algorithm concepts, data structure choices, method details, and complete code with examples and explanations.
AlgorithmJavaLRU cache
0 likes · 10 min read

This article explains the LeetCode LRU Cache problem, detailing the required class interface, operational constraints, and provides a thorough Java solution using a HashMap combined with a doubly linked list to achieve O(1) time complexity for get and put operations.
HashMapJavaLRU cache
0 likes · 10 min read

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 EvictionGoLRU cache
0 likes · 4 min read

Learn how to implement a Least Recently Used (LRU) cache from scratch using a hash map combined with a doubly linked list in Java, covering the core concepts, node structure, get and put operations, and eviction logic to efficiently manage hot data.
HashMapLRU cachedata structures
0 likes · 6 min read

This article explains the LRU (Least Recently Used) caching principle, shows how to build an O(1) LRU cache using a HashMap and doubly linked list in Java, and describes Redis's approximate LRU eviction algorithm based on a global clock and random sampling.
CachingHashMapJava
0 likes · 9 min read

This article explains why technical interviews focus on problem‑solving skills, outlines a four‑step interview approach, introduces the LRU cache eviction policy, analyzes required operations, selects HashMap plus a doubly linked list as the optimal data structures, and provides a complete Java implementation with detailed commentary.
Cache EvictionHashMapInterview
0 likes · 15 min read

This article explains the LRU caching principle, compares naive O(n) implementations, and shows how to achieve true O(1) insert and eviction using a HashMap combined with a doubly linked list, including practical Java code and an overview of Redis's approximate LRU algorithm.
HashMapLRU cacheRedis
0 likes · 12 min read
