void reverse(node *list)
{
if(list->next==NULL)
return;
else
reverse(list->next);
list->next->next=list;
return;
}
On Sat, Jul 30, 2011 at 8:11 PM, bharath sriram <[email protected]>wrote:
> Can anyone give the recursive version of reversing a linked list. Please
> post the reverse function code snippet and not the entire .c file since it
> just hampers readability.
>
> Bharath.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
--
Nikhil Gupta
Senior Co-ordinator, Publicity
CSI, NSIT Students' Branch
NSIT, New Delhi, India
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.