InterviewForge

LRU Cache — Interview Guide

Design an O(1) LRU cache with a hash map plus doubly linked list, the design question that tests data-structure combination skills.

Updated 2026-09MediumDesign

The problem

Design a data structure that supports get(key) and put(key, value) in O(1) average time, with a fixed capacity that evicts the least-recently-used item when full.

Unlock the full guide

Premium members get every DSA, system design, company and role interview guide — plus AI practice, mock interviews, and analytics.

Unlock with Premium