Write a function which reverses a linked list.
Utilisateur anonyme
Node * reverse(Node *head){ Node * prev=head; Node *curr=head->next; Node * next=head->next->next; while(next!=NULL){ curr->next=prev; prev=curr; curr=next; next=next->next; } return curr; }