@@ -0,0 +1,622 @@
+/*%0A  Insert Node at the end of a linked list%0A  head pointer input could be NULL as well for empty list%0A  Node is defined as%0A  class Node %7B%0A     int data;%0A     Node next;%0A     Node prev;%0A  %7D%0A*/%0A%0ANode Reverse(Node head) %7B%0A%0A    // Check for empty list%0A    if (head == null) %7B return head; %7D%0A%0A    // Check if we reached tail%0A    if (head.next == null) %7B%0A        head.next = head.prev;%0A        head.prev = null;%0A        return head;%0A    %7D%0A%0A    // Swap next and prev pointers%0A    Node temp = head.prev;%0A    head.prev = head.next;%0A    head.next = temp;%0A%0A    // Call reverse on next node in list%0A    return Reverse(head.prev);%0A%0A%7D%0A

solve reverse a doubly linked list