Company: OYO_1aug
Difficulty: medium
Optimized Cache Hit Counter Simulate a cache that uses the **Least Recently Used (LRU)** eviction policy. The cache has capacity `C` and processes `N` memory-access requests in order. A request is a **hit** when its address is already in the cache; otherwise it is a **miss**. After every request, that address becomes the most recently used address. On a miss, insert the requested address. If the cache is already full, first evict the least recently used address. Print the total number of cache hits and cache misses. Input Format - The first line contains an integer `C`, the cache capacity. - The second line contains an integer `N`, the number of memory accesses. - The third line contains `N` space-separated integers, the requested memory addresses. Output Format Print two space-separated integers: the total hits followed by the total misses. Constraints - `1 ≤ C ≤ 10^4` - `1 ≤ N ≤ 10^5` - `0 ≤ address ≤ 10^9` Example Input: `3 10 1 2 3 1 4 5 2 1 3 4` Output: `1 9` Notes - T