Reverse a linked list (iteratively and recursively)