求大神 链式线性表逆置函数 求解释
![](zzz/editor/img/code.gif)
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; }