+1 vote
in Data Structures & Algorithms I by (110k points)
What technique is used in Transpose method?

(a) searched node is swapped with its predecessor

(b) node with highest access count is moved to head of the list

(c) searched node is swapped with the head of list

(d) searched nodes are rearranged based on their proximity to the head node

My question is based upon Types of Lists topic in chapter Types of Lists of Data Structures & Algorithms I

I had been asked this question in an online quiz.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Correct option is (a) searched node is swapped with its predecessor

Easy explanation - In Transpose method, if any node is searched, it is swapped with the node in front unless it is the head of the list. So, in Transpose method searched node is swapped with its predecessor.

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.