+1 (218) 451-4151
glass
pen
clip
papers
heaphones

1. Describe an efficient external-memory algorithm that determines whether an array of n integers…

1. Describe an efficient external-memory algorithm that determines whether an array of n integers…

1. Describe an efficient external-memory algorithm that determines whether an array of n integers contains a value occurring more than n/2 times.2. Consider the page caching strategy based on the least frequently used (LFU) rule, where the page in the cache that has been accessed the least often is the one that is evicted when a new page is requested. If there are ties, LFU evicts the least frequently used page that has been in the cache the longest. Show that there is a sequence P of n requests that causes LFU to miss Ω(n) times for a cache of m pages, whereas the optimal algorithm will miss only O(m) times.