https://pta.patest.cn/pta/test/15/exam/3/question/724

时间:2016-06-09 06:10:37   收藏:0   阅读:1135

List Reverse( List L )
{
if(L==NULL)
return;
List head=(List)malloc(sizeof(struct Node));
head->Next=NULL;
List q=L,p;
while(q!=NULL)
{
p=q;
q=q->Next;
p->Next=head->Next;
head->Next=p;
}
return head->Next;
}

原文:http://www.cnblogs.com/hutao886/p/5571785.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!