@@ -0,0 +1,1339 @@
+package data_structures.linked_lists;%0D%0A%0D%0A/*%0D%0A * Problem Statement:%0D%0A * Youre given the pointer to the head node of a doubly linked list. Reverse%0D%0A * the order of the nodes in the list. The head node might be NULL to indicate%0D%0A * that the list is empty.%0D%0A * %0D%0A * Input Format:%0D%0A * You have to complete the Node* Reverse(Node* head) method which takes one%0D%0A * argument - the head of the doubly linked list. You should NOT read any input%0D%0A * from stdin/console.%0D%0A * %0D%0A * Output Format:%0D%0A * Change the next and prev pointers of all the nodes so that the direction of%0D%0A * the list is reversed. Then return the head node of the reversed list. Do NOT%0D%0A * print anything to stdout/console.%0D%0A * %0D%0A * Sample Input: %0D%0A * NULL%0D%0A * NULL %3C-- 2 %3C--%3E 4 %3C--%3E 6 --%3E NULL%0D%0A * %0D%0A * Sample Output: %0D%0A * NULL%0D%0A * NULL %3C-- 6 %3C--%3E 4 %3C--%3E 2 --%3E NULL%0D%0A */%0D%0Apublic class ReverseDoublyLinkedList %7B%0D%0A%0D%0A%09DNode Reverse(DNode head) %7B%0D%0A%09    if (head != null) %7B%0D%0A%09        DNode runner = head;%0D%0A%09        DNode temp = head;%0D%0A%09        %0D%0A%09        while (runner != null) %7B%0D%0A%09            temp = runner.prev;%0D%0A%09            %0D%0A%09            runner.prev = runner.next;%0D%0A%09            runner.next = temp;%0D%0A%09            %0D%0A%09            runner = runner.prev;%0D%0A%09        %7D%0D%0A%09        %0D%0A%09        if (temp != null) %7B%0D%0A%09            head = temp.prev;%0D%0A%09        %7D%0D%0A%09    %7D%0D%0A%09    return head;%0D%0A%09%7D%0D%0A%7D

Add ReverseDoublyLinkedList