帝临九天隐藏英雄密码:关于数据结构单链表的一个题目啊
来源:百度文库 编辑:神马品牌网 时间:2024/05/14 12:22:05
void Contrary (struct sNode **HL)
{ struct sNode *p=*HL;
*HL=NULL;
while(p!=NULL)
{ struct sNode *q=p;
p=p->next;
q->next=*HL;
*HL=q;
}
}
{ struct sNode *p=*HL;
*HL=NULL;
while(p!=NULL)
{ struct sNode *q=p;
p=p->next;
q->next=*HL;
*HL=q;
}
}