Code out an LRU cache.
Implement lru_cache(operations, capacity), where each operation is a list of strings and integers. A put operation has the form ["put", key, value]; a get operation has the form ["get", key]. Return the values produced by get operations in order, using -1 for missing keys. Both get and put must run in O(1) average time. Accessing or updating a key makes it the most recently used item. When the cache exceeds capacity, evict the least recently used item.
def lru_cache(operations, capacity):