a simple function to reverse a linked list with recursive and Iterative Method