The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?
Singly linked list
Doubly linked list
Circular doubly linked list
Array implementation of list
The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?
Singly linked list
Doubly linked list
Circular doubly linked list
Array implementation of list
Doubly linked list cannot be answer because we cannot find last element of a doubly linked list in O(1) time.
In a circular linked list, there is no last element. So two linked list can be merged in O(1) time
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.