1.

Which of the following is true about the Move-To-Front Method for rearranging nodes?(a) node with highest access count is moved to head of the list(b) requires extra storage(c) may over-reward infrequently accessed nodes(d) requires a counter for each nodeI'd like to ask this question from Types of Lists in chapter Types of Lists of Data Structures & Algorithms II had been asked this question in an internship interview.

Answer»

The correct option is (c) may over-reward infrequently accessed nodes

For explanation: In Move-To-front Method the ELEMENT which is searched is moved to the head of the list. And if a NODE is searched even once, it is moved to the head of the list and given maximum PRIORITY even if it is not going to be accessed frequently in the future. Such a SITUATION is REFERRED to as over-rewarding.



Discussion

No Comment Found

Related InterviewSolutions