How do you reverse a singly linked list in-place using only pointers?
Implement reverse_list(head) and return the new head after reversing the list. The evaluator constructs the linked list from an input array and serializes the returned list back to an array. Do not create replacement nodes or use arrays, stacks, or other collections.
def reverse_list(head):