1 votes 1 votes Can we reverse a linked list in less than O(n) time?? DS linked-list + – G Shaheena asked Aug 27, 2017 G Shaheena 381 views answer comment Share Follow See 1 comment See all 1 1 comment reply Warlock lord commented Aug 27, 2017 reply Follow Share Reversing a singly linked list in less than O(n)? No Doubly linked list? Yes. All you have to do is swap the head and tail reference. That's all. Since it is doubly linked we don't have to deal with switching the directions of the references. 3 votes 3 votes Please log in or register to add a comment.
0 votes 0 votes reversing a linked list in less than O(n) time is almost impossible sandeepjkh answered Aug 28, 2017 sandeepjkh comment Share Follow See all 0 reply Please log in or register to add a comment.