struct node* revll(struct node* root)
{
return reverse(root,NULL);
}

struct node* reverse(struct node* head,struct node* prev)
{
struct node* temp1;
if(head->next==NULL)
{
head->next=prev;
return head;
}
else
{
temp1=reverse(head->next,head);
head->next=prev;
return temp1;
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to