Medium Design

LRU Cache

Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the `LRUCache` class with `get(int key)` and `put(int key, int value)` methods.
Ctrl+Space autocomplete Ctrl+/ comment F11 fullscreen
Output Console
▶ Ready. Click "Run" to execute...