Write a function to reverse a linked list both iteratively and recursively, explaining the memory trade-offs of each.