1. [OA] LRU Cache — Implement the caching layer for ByteDance's real-time content delivery
For efficient performance on ByteDance's content delivery platform, we need a system that caches frequently accessed user data and drops the least recently used data when the capacity is exceeded. You are to implement an LRU (Least Recently Used) cache.Class Name:LRUCache
Update or insert the value if the key is not already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting a new item.