1.

What is the competitive analysis of the FIFO algorithm?(a) k/k+1(b) k+1(c) k(k+1)(d) k/(k-h+1)The question was posed to me in a job interview.This is a very interesting question from Page Replacement Algorithms in portion Page Replacement Algorithms of Data Structures & Algorithms II

Answer»

The correct answer is (d) k/(k-H+1)

Easy explanation - The competitive ANALYSIS of a FIFO algorithm is MATHEMATICALLY found to be k/(k-h+1) where k and h are some CONSTANTS USED in page replacement and always, h<=k.



Discussion

No Comment Found

Related InterviewSolutions