求大神 链式线性表逆置函数 求解释
程序代码:int fan(LinkList &L)
{
Node *p,*q;
p=L->next;
L->next=NULL;
while(p)
{
q=p->next;
p->next=L->next;
L->next=p;
p=q;
}
return 1;
}
程序代码:int fan(LinkList &L)
{
Node *p,*q;
p=L->next;
L->next=NULL;
while(p)
{
q=p->next;
p->next=L->next;
L->next=p;
p=q;
}
return 1;
}
2013-10-01 16:14

2013-10-04 16:21