Given the head of a doubly linked list, reverse it in-place by swapping each node's next and prev pointers. Return the new head.
Input: Head of a doubly linked list.
Output: New head of the reversed DLL (values array).
Input: [1,2,3,4,5]
Output: [5,4,3,2,1]
Explanation: Swap next/prev of every node. Old tail becomes new head.Input: [1,2]
Output: [2,1]
Explanation: Swap: 2.prev=NULL; 1.next=NULL; 2.next=1; 1.prev=2.Input: [7]
Output: [7]
Explanation: Single node unchanged.1<=nodes<=10^5-10^9<=Node.val<=10^9