Tagged articles

O(1) complexity

2 articles · Page 1 of 1
IT Services Circle
IT Services Circle
Oct 26, 2026 · Fundamentals

How LRU Cache Achieves O(1) Get and Put with Hash Map and Doubly Linked List

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.

LRU cacheO(1) complexityPython implementation
0 likes · 11 min read
How LRU Cache Achieves O(1) Get and Put with Hash Map and Doubly Linked List
Liangxu Linux
Liangxu Linux
Aug 10, 2021 · Operations

How Linux Implements High‑Performance Timers with a Hierarchical Timing Wheel

This article explains the various timer implementations—sorted linked list, min‑heap, balanced binary tree, and especially the hierarchical timing wheel used in the Linux kernel—detailing their time complexities, data structures, and the core C code that inserts and executes timers efficiently.

C programmingO(1) complexitykernel timers
0 likes · 11 min read
How Linux Implements High‑Performance Timers with a Hierarchical Timing Wheel