Leetcode 146. LRU Cache
Implement an LRUCache that supports O(1) average-time get(key) returning the value or -1 and put(key, value) which inserts or updates a key and, if capacity is exceeded, evicts the least-recently-used key. The core challenge is maintaining key-value storage together with recency ordering to enable constant-time access, updates, and eviction.
Estruture solução, trade-offs e complexidade com clareza.