Given the head of a singly linked list, reverse the list, and return the reversed list.
Init: prev = null, curr = head
1
2
3
4
5
prev → NULL
nxt → NULL