Given a pointer to the head node of a linked list, the task is to reverse the linked list. The links between the nodes need to be changed in order to reverse the list.
Divide the linked list in two parts, the first node and the rest, and call the recursion for the second part while maintaining the connection between them.