← Microsoft questions

Implement LRU Cache with custom lookup signatures

Filed under Microsoft

Design a Least Recently Used (LRU) cache. Implement the LRUCache class with get(key) and put(key, value) methods. Both must run in O(1) average time complexity.

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.