The least recently used (LRU) cache algorithm exists the element from the cache(when it’s full) that was least recently used. After an element is requested from the cache, it should be added to the cache (if not already there) and considered the most recently used element in the cache. Initially, the cache is empty. The input to the function LruCountMiss shall consist of an integer max_cache_size, an array pages and its length Len The function should return an integer for the number of cache misses using the LRU cache algorithm. Assume that the array pages always have pages numbered from 1 to 50.
The least recently used (LRU) cache algorithm exists the element from the cache(when it’s full) that was least recently used. After an element is requested from the cache, it should be added to the cache (if not already there) and considered the most recently used element in the cache. Initially, the cache is empty. The input to the function LruCountMiss shall consist of an integer max_cache_size, an array pages and its length Len The function should return an integer for the number of cache misses using the LRU cache algorithm. Assume that the array pages always have pages numbered from 1 to 50.