Reverse Linked List

Given the head of a singly linked list, reverse the list in place and return the new head.

You must change the next pointers so the list points in the opposite direction. Do not allocate a separate list of values and rebuild the answer unless you are explicitly using that as a simpler approach.

Examples
Input: [[1,2,3,4,5]]
Output: [[1,2,3,4,5]]
Hints

Reverse Linked List

Given the head of a singly linked list, reverse the list in place and return the new head.