• + 2 comments

    python3 version:

    def Reverse(head):
        if not head:
            return head
        head.next, head.prev = head.prev, head.next
        if not head.prev:
            return head
        return Reverse(head.prev)