CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

The concatenation of two lists is to be performed In 0(1) time. Which of the following implementations of a list should be used?

A
Doubly linked list
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Singly linked list
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Circular doubly linked list
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
Array implementation of list
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C Circular doubly linked list
As list concatenation requires traversing at least one list to the end. So singly linked list and doubly linked list requires O(n) time complexity whereas circular doubly linked list required O(1) time.

flag
Suggest Corrections
thumbs-up
2
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Summation by Sigma Method
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon