Reverse a singly linked list.
click to show more hints.
Hint:
A linked list can be reversed either iteratively or recursively. Could you implement both?
Show Tags Linked List
Show Similar Problems (M) Reverse Linked List II (M) Binary Tree Upside Down (E) Palindrome Linked List