posted by Ivic at 3:02 PM
llist *reverseList(llist* head){ llist* p,*c, *n; c=head; n=c->next; c->next=0; while(n) { p=c; c=n; n=c->next; c->next=p; } return c;}
By Ivic, at 3:03 PM
Post a Comment << Home
View my complete profile
1 Comments:
llist *reverseList(llist* head){
llist* p,*c, *n;
c=head;
n=c->next;
c->next=0;
while(n)
{
p=c;
c=n;
n=c->next;
c->next=p;
}
return c;
}
By Ivic, at 3:03 PM
Post a Comment
<< Home