Preps
Saturday, 9 July 2011
Reversing
struct node reverse(struct node * first)
{
struct node* cur,temp;
cur = NULL;
while(first != NULL)
{
temp = first;
first = first->link;
temp->link = cur;
cur = temp;
}
return cur;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment