Node* recursive(Node* root){
if(root->next!=NULL){
Node* head=recursive(root->next);
root->next->next=root;
root->next=NULL;
return head;
}
return root;
}
struct Node* reverseList(struct Node *root)
{
if(root==NULL)return NULL;
if(root->next==NULL)return root;
return recursive(root);
}