Added a code to reverse a linked list