反转链表
node * func(node*phead)
{
node* cur_next;
node* cur_previous = NULL;
node* current = phead;
while(current != NULL)
{
cur_next = current->pnext;
current->pnext = cur_previous;
cur_previous = current;
current = cur_next;
}
return cur_previous;
}
参考:https://blog.csdn.net/Li_haiyu/article/details/88668383