NumPy allowed · plain Python earns 10 bonus points
Simulate an LRU cache eviction and access sequence preserving access recency ordering.
Implement lru_cache_access(operations, capacity): simulate a fixed-capacity LRU cache. When capacity is exceeded during a put, evict the least recently accessed key. Return a list containing the return values of all get operations (-1 when key is not found).
lru_cache_access(operations: list[dict], capacity: int) -> list[any]