Given the head of a singly linked list, reverse the list and return the new head.
Input: head = [1, 2, 3, 4, 5] Output: [5, 4, 3, 2, 1] Explanation: Each node's next pointer is redirected to the previous node; the old tail (5) becomes the new head.
Input: head = [1, 2] Output: [2, 1] Explanation: The two-node list is reversed so 2 becomes the new head.
Input: head = [] Output: [] Explanation: An empty list reversed is still empty.
head = [1, 2, 3, 4, 5]