Given the head of a singly linked list, reverse the list, and return the reversed list.
Given the pointer to the head node of a linked list, change the next pointers of the nodes so that their order is reversed. The head pointer given may be null meaning that the initial list is empty.