Program to reverse linked list iteratively and recursively