• + 1 comment

    It seems like the tests aren't thorough enough. if you reverse the list as if it were a singly linked list (eg ignoring all prev pointers) you get full credit.

    Node Reverse(Node head) {
        if (head == null || head.next == null){
            return head;
        }
    
        Node newHead = Reverse(head.next);
        // head.next.prev = head.next.next;
        head.next.next = head;
        // head.prev = head.next;
        head.next = null;
    
        return newHead;
    }