719. Linked List - Reverse a linked list (iterative, data)
Implement an iterative algorithm to reverse the data of a linked list's nodes.
N represents the number of nodes in the linked list. The next line contains N space-separated numbers representing the content of the linked list.
The reversed linked list is represented by N space-separated numbers, showing the content of the reversed linked list.
5 10 20 30 40 50
50 40 30 20 10