struct ListNode* ReverseList(struct ListNode* pHead ) {
// write code here
struct ListNode* p = pHead;
struct ListNode* r ;
struct ListNode* new = NULL;
while(p!=NULL)
{
r=p->next;
p->next = new;
new = p;
p=r;
}
return new;
}
09-04
179
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交