← Questions

Implement an LRU cache

0
GoogleMetaAmazon+3CodingLast asked Oct 2026

Implement a least-recently-used cache with get(key) and put(key, value), both in O(1) time, with a fixed capacity.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding