Implement LRU Cache
Design and implement a Least Recently Used (LRU) cache data structure that supports get and put operations in O(1) time complexity. The cache should evict the least recently used item when it reaches its capacity limit.
Asked at:
LinkedIn
Shopify
Try It Yourself
Practice LRU Cache in a 30-minute build session with AI-powered feedback
Try It Yourself
Practice LRU Cache in a 30-minute build session with AI-powered feedback
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late September, 2026
Senior
Mid September, 2026
Shopify
Staff
Early September, 2026
Shopify
Manager
Your account is free and you can post anonymously if you choose.