
Implement an LRU cache with fixed capacity. Support get(key) and put(key, value) so that both run in O(1) average time, and evict the least recently used key when the cache is full.
LRUCache(2), put(1,1), put(2,2), get(1), put(3,3), get(2)Output[null, null, null, 1, null, -1]LRUCache(1), put(2,1), get(2), put(3,2), get(2), get(3)Output[null, null, 1, null, -1, 2]`1 <= capacity <= 3000``0 <= key <= 10^4``0 <= value <= 10^5`Up to `2 * 10^5` operations