码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2016-06-09 06:13:09      阅读:1286      评论:0      收藏:0      [点我收藏+]

标签:

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;
}

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

标签:

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!