like the Singly Linked list as One pass doubly Linked also reverse.

so complexity becomes O(n)

Read complete solution: https://www.geeksforgeeks.org/reverse-doubly-linked-list-set-2/

https://www.hackerrank.com/challenges/reverse-a-doubly-linked-list/forum