← Microsoft questions
Low-Level DesignMediumReported in a candidate post, Jul 2025

Implement an LRU cache

Filed under Microsoft · Also reported at Adobe, BigBasket, Citrix, Expedia, Intuit, Palantir, Paytm

Design and implement a data structure for a Least Recently Used (LRU) cache. Implement the class LRUCache: - LRUCache(capacity): initialise the cache with a positive capacity. - get(key): return the…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.