+1 vote
in Data Structures & Algorithms I by (110k points)
Which of the following method performs poorly when elements are accessed in sequential order?

(a) count method

(b) move to front method

(c) transpose meth

(d) ordering method

I'd like to ask this question from Types of Lists topic in chapter Types of Lists of Data Structures & Algorithms I

This question was addressed to me in a job interview.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Right choice is (b) move to front method

Easy explanation - Move-to-front method performs poorly when the elements are accessed in sequential order, especially if that sequential order is then repeated multiple times.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.