44 votes 44 votes The concatenation of two lists is to be performed on $O(1)$ time. Which of the following implementations of a list should be used? Singly linked list Doubly linked list Circular doubly linked list Array implementation of list DS gate1997 data-structures linked-list easy + – Kathleen asked Sep 29, 2014 • edited Jan 5, 2018 by kenzou Kathleen 19.5k views answer comment Share Follow See all 8 Comments See all 8 8 Comments reply Show 5 previous comments mrinmoyh commented Oct 2, 2019 reply Follow Share In doubly linked list how can u go to the last node of 1st list in O(1) time. 1 votes 1 votes apurva_patel commented Aug 7, 2020 reply Follow Share we can have a tail pointer in doubly linked list. So, can we just modify the tail pointer of 1'st list and head pointer of 2nd list for concatination? 0 votes 0 votes Anshuman Panda commented Sep 14, 2022 reply Follow Share To point the tail pointer to last element, you have to traverse through the list. 0 votes 0 votes Please log in or register to add a comment.
5 votes 5 votes http://stackoverflow.com/questions/25938499/linked-list-concatenation-in-o1-time Anu answered May 15, 2015 Anu comment Share Follow See all 0 reply Please log in or register to add a comment.