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/
I did mistake there. For reversing the doubly linked list we have to swap the next and previous pointer by visiting each and every node and at last change the head to the last node of the linked list.
void swap(node *next, node *temp)
node * temp = NULL;
temp = next;
next = prev;
prev = temp;
This code should be run on each and every node of the linked list.
The similar task will be done on the circular linked list.