Object-Oriented Programming · Bloomberg · Hard
You are given an in‑memory cache that currently only handles LRU (Least Recently Used) eviction. Your task is to redesign it so that the caching logic is separated from the eviction‑policy logic, allowing the cache to support multiple eviction strategies without modifying its core. Implement the following: A generic Cache class with three operations: get(key), put(key, value), and delete(key). An eviction‑policy abstraction that the Cache can call without knowing any policy…
Checking your access…