The concatenation of two lists is to be performed in O(1) time. Which of the following implementations of lists could be used?
Show answerHide answer
Correct answer: (C) Circular doubly linked list
Explanation
In a circular doubly linked list the last node is reached directly through head->prev. So two lists can be joined by changing a few pointers in O(1) time, without traversing.